0

When trying to connect to a database using the default instance name [server]\[instance] I get:

Cannot connect to RT-WEB\SQLEXPRESS
--> 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)(Microsoft SQL Server)

But if I try to connect to the same server, without including the instance, I am able to connect. There is only 1 instance of SQL on this server. This wouldn't be an issue, but I am trying to create a replication subscription for this server, and it wants the instance name when establishing a connection. Error from that screen:

Cannot connect to RT-WEB
-->SQL Server replication requires the actual server name to make a connection to the server.  Specify the actual server name, 'RT-WEB\SQLEXPRESS'. (Replication.Utilities)

It is the case that RT-WEB is an alias from the hosts file, but when I use the server's IP I get the exact same error, including suggested server name.

1 Answer 1

0

Because you can connect without naming the instance, that tells me that your instance is running, and is listening on the default TCP port of 1433.

Because you can not connect when naming the instance, that tells me that either the SQL Browser service is not running on the server, or that UDP 1434 is blocked between the client and the server. (For a client to connect to an instance by name, it needs to use UDP port 1434 to talk to the SQL Browser service on the server in order to find out what port that instance is using.)

So, check that the SQL Browser service is running on the server, and that any firewalls between the client and the server are configured to allow traffic on UDP port 1434.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .