I am trying to configure replication as per the official tutorial from Microsoft. In the section Create a subscription to the transactional publication, see step 5.
The name of the subscriber instance is not displayed, so I click Add Subscriber, and then click Add SQL Server Subscriber from the drop-down list. Then the Connect to Server dialog box appears. I enter the subscriber instance name, switch to SQL Server Authentication, fill out the sa username and password, and then click Connect.
After a few seconds, an error dialog appears that reads:
Cannot connect to DBSUB\SQLEXPRESS.
-> Failed to connect to server DBSUB\SQLEXPRESS. (Microsoft.SqlServer.ConnectionInfo)
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)
The thing is, the server IS very much available. I am able to
ping DBSUB as well as RDP into it.
The SQL Server Agent is running.
The SQL Server instance is configured to allow remote connections. (RDP to DBSUB, log into
DBSUB\SQLEXPRESS with SQL Server Management Studio on DBSUB (as opposed to SQL Server Management Studio on DBPUB), Server Properties, Connections page, Allow remote connections to this server is checked)
Strangely, intentionally entering the wrong name (DBSUB, DBSUB\BLAH, etc) produces a different error.
Also note that this is not an Express instance. It is an old name from an upgrade.
I would very much appreciate help solving this issue.
Thank you in advance,
Update: I have configured Aliases as per this article (sorry it's behind a microsoft login). The instructions were incorrect; however, after learning a bit about Aliases, I was able to correctly set it up. Unfortunately, I get a new error that states that Aliases are not a solution to this issue.
Cannot connect to Subscriber.
SQL Server replication requires the actual server name to make a connection to the server. Connections through a server alias, IP address, or any other alternate name are not supported. Specify the actual server name, 'DBSUB\SQLEXPRESS'. (Replication.Utilities)
I noticed the SQL Browser service was not running. I enabled it on both Publisher and Subscriber and connected to it through DBSUB\SQLEXPRESS and now it works.