Trying to connect to a SQL Server 2005 instance remotely but getting the following 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: SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified)
Have checked and the server is enabled to accept remote connections. Connection string I’m using in .NET looks like this:
Data Source=SERVERIP\INSTANCE;Initial Catalog=DATABASENAME;User Id=USERNAME;Password=PASSWORD;
Any ideas? Thank you 🙂
You might want to try a quick telnet to TCP port 1433 of the server to see if you can establish a connection that way.
If you can’t, you know that it’s at the network layer, and you can start checking things like the Windows Firewall or other network pieces that might get in your way. (You also need access via UDP to port 1434.)