views:

74

answers:

3

i am having management stdio 2005 in my machine and im tring to connect to sql server 2008

i'm receiving the following message as the inner exception .

{"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)"}

can anyone please help

thanks,

vijay.

+1  A: 
  • Open up the SQL Server Configuration Manager
  • Expand the node "SQL Server Network Configuration"
  • Click on protocols node
  • Right click on "Named Pipes" -> Enable
  • Restart the SQL Server service
Greco
+2  A: 

The protocol you're using (Named Pipes) is only valid if you're connecting to the local machine. If you're connecting to a remote machine, you need to enable the TCP protocol.

Other things to check:

  • Is your connection string correct? Server name spelled correctly?
  • Is any firewall allowing TCP traffic? The default port is 1433 for a basic setup.
Eric J.
A: 
  • Make sure the database is configured to allow remote connections.
  • If using an instance, ensure you're pointing at that instance in your connectionstring.
tsilb