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


Select @@Servername

select SERVERPROPERTY(‘ServerName’)

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

Use Master


Sp_DropServer ‘OldName’



Use Master


Sp_Addserver ‘NewName’, ‘local’


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.


This entry was posted in Replication. Bookmark the permalink.

Leave a Reply

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

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

Google photo

You are commenting using your Google 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 )

Connecting to %s