Saturday, February 25, 2012

Cannot connect to to the other server when setting up replication in SQL 2005

Im trying to setup replication between two 2005 standard editions. They are on the same LAN and installed equally + SP1. They are installed as named instances (with the same instance name MSSQL01). Remote access is allowed and TCP/IP and shared memory and I can connect between them.

SQL1\MSSQL01 is configured as the publisher & distributor and the snapshot is done. When Im using the subscriber wizard from SQL1 to create the subscriptions and add SQL2\MSSQL01 as a subscriber the connection fails to the remote server.

The error message is:

TITLE: Connect to Server

Cannot connect to SQL2\MSSQL01.


ADDITIONAL INFORMATION:

Failed to connect to server SQL2\MSSQL01. (Microsoft.SqlServer.ConnectionInfo)

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)

When I do a manual connection to SQL2 using the server managemnet studio on SQL1 I cannot connect using the instance name e.g. SQL2\MSSQL01, it works only when only using the server name e.g. SQL2. Then I have full access both when using a windows or SQL user.

When trying with using the server name only when setting up the subscription, I got a error saying that I need to use the full name.

TITLE: Connect to Server

Cannot connect to TFMHQARNDE07.


ADDITIONAL INFORMATION:

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, ' SQL2\MSSQL01'. (Replication.Utilities)

I can also mention that theese servers are cloned from another server and I needed to drop the old servername and add the new servername (sp_addserver) on both servers to get the publisher to work.

When I try to setup the subscription from SQL2 and add SQL1 as a publisher I get the same error.

Any one have any idea what it can be?

I found the problem. I didnt have the SQL Browser service runnning which looks to be needed when using instances. After starting it, it works to connect.

No comments:

Post a Comment