Configure SQL Server to Allow Remote Connections
Posted
by Ben Griswold
on Johnny Coder
See other posts from Johnny Coder
or by Ben Griswold
Published on Wed, 24 Mar 2010 22:44:09 +0000
Indexed on
2010/03/24
22:53 UTC
Read the original article
Hit count: 507
SQL Server
|Services
Okay. This post isn’t about configuring SQL to allow remote connections, but wait, I still may be able to help you out.
"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server)"
I love this exception. It summarized the issue and leads you down a path to solving the problem. I do wish the bit about allowing remote connections was left out of the message though. I can’t think of a time when having remote connections disabled caused me grief. Heck, I can’t ever remember how to enable remote connections unless I Google for the answer.
Anyway, 9 out of 10 times, SQL Server simply isn’t running. That’s why the exception occurs. The next time this exception pops up, open up the services console and make sure SQL Server is started. And if that’s not the problem, only then start digging into the other possible reasons for the failure.
© Johnny Coder or respective owner