Publisher Error: could not connect to server ‘Newname’ because distributor_admin is not defined as a remote login at the server


can occur if there was replication setup on the server and the server was renamed before replication was dropped.  In order to correct this you will need to run the proper SQL statements to drop both the publisher and distributor on the server.  Then manually go through the original publisher and distributor server to ensure all replication has been removed before you begin setting up replication on the server.

If the server was renamed then you can run the following SQL statements on the corresponding servers to check if they return the correct server names.

Check Server Properties

 

Use Master

go

Select @@Servername

select SERVERPROPERTY(‘ServerName’)

If the @@ServerName returns a NULL than try the following query:

Use Master

go

Sp_DropServer ‘OldName’

GO

 

Use Master

go

Sp_Addserver ‘NewName’, ‘local’

GO

You can use the @@SERVERNAME global variable or the SERVERPROPERTY(‘ServerName’) function in SQL Server to find the network name of the computer running SQL Server.

The ServerName property of the SERVERPROPERTY function automatically reports the change in the network name of the computer when you restart the computer and the SQL Server service.

The @@SERVERNAME global variable retains the original SQL Server computer name until the SQL Server name is manually reset.

 

Advertisements
This entry was posted in Replication. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s