1

I am trying to create a new SQL DB in Visual Studio 2010, and Upon entering a Server Name and a DB name then pressing Ok, I get this error.

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)

Any ideas?

user2469932
  • 167
  • 1
  • 3
  • 13
  • duplicate of http://stackoverflow.com/questions/18060667/connect-to-server-a-network-related-or-instance-specific-error – Linga Nov 22 '13 at 09:19
  • this is connection related error .. please check your connection string – Dhaval Nov 22 '13 at 09:36

2 Answers2

1

Just go through this article.I think you can solve the problem. http://blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/

Also ensure you have specified servername and database name correctly in connection string.just take connection string from property window of added database.

sreejithsdev
  • 1,202
  • 12
  • 26
0

Try this article, it goes through pretty much all the steps you will need to troubleshoot your connectivity problems:

http://social.technet.microsoft.com/wiki/contents/articles/2102.how-to-troubleshoot-connecting-to-the-sql-server-database-engine.aspx

  • Whilst this may theoretically answer the question, [it would be preferable](//meta.stackoverflow.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. – Baum mit Augen Nov 06 '16 at 21:28