Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

TITLE: Connect to Server

Cannot connect to localhost.


ADDITIONAL INFORMATION:

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) (Microsoft SQL Server, Error: 2)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

I keep getting this error when trying to connect to sql server. I also ran a repair and I got this error.

enter image description here

Could this be the problem and do you have any idea how I can repair it. I have looked all over Google and tried quite a few solutions with no luck.

I am Using SQL Server 2008 R2 Developer Edition

share

migration rejected from stackoverflow.com Sep 11 '13 at 9:35

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as off-topic by Mark Storey-Smith, RolandoMySQLDBA, StanleyJohns, dezso, ypercube Sep 11 '13 at 9:35

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – Mark Storey-Smith, RolandoMySQLDBA, StanleyJohns, dezso, ypercube
If this question can be reworded to fit the rules in the help center, please edit the question.

    
Which SQL Server version you are using ? –  JackLock Mar 13 '13 at 16:52
    
@JackLock I am using 2008 R2 Developer Edition –  Lawrence Smith Mar 13 '13 at 16:53
    
This might help. support.microsoft.com/kb/883732 –  JackLock Mar 13 '13 at 16:58
    
@JackLock Thank you but I've tried that, HKEY_LOCAL_MACHINE\Cluster\Resources\<GUID>\Parameters. There is no cluster in HKEY_LOCAL_MACHINE –  Lawrence Smith Mar 13 '13 at 17:01
    
May be that is the issue. May be you have to create entry like that ? I am not much familiar with the issue so I am just guessing here. –  JackLock Mar 13 '13 at 17:06

1 Answer 1

Beside configuration in SQL Server Configuration Manager, you must also check firewall settings, because, this can filter traffic.

I had similar problem, all configuration settings was correctly set, but firewall deny connection to specific server.

Turn off firewall for start, if connection to SQL Server succeed, then you know what is problem. Then, if you really must keep firewall turned on, you must find specific firewall rule which is related with SQL Server, and disable this rule.

share