Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error setting up Distributor

Status
Not open for further replies.

cocopud

Technical User
Jan 8, 2002
139
US
I have been trying to setup Replication and have been getting the following error on the Distributor:

Error 18483: Could not connect to Server 'SERVERDB02' because 'distributor_admin' is not defined as a remote login at the server.

I have searched for info on this and I believe it is something to do with the servername. If I run SELECT @@SERVERNAME it returns 'DB-TEST'. Should these names be the same? I have tried doing a sp_dropserver and sp_addserver and restarting the service, but I still cannot get it to work.

Is this the problem? How do I fix it?
 
As far as I remember, that happens when the network name of the machine SQL Server is working on is different from the value of @@SERVERNAME global variable. I found that script:

Code:
USE master 
DECLARE @network_name varchar(100), 
@sql_server_name varchar(100)
SELECT @network_name = CONVERT(varchar(100), SERVERPROPERTY('ServerName'))
SELECT @sql_server_name = CONVERT(varchar(100), @@SERVERNAME)
EXEC sp_dropserver @server=@sql_server_name
EXEC sp_addserver @server=@network_name, @local='local'

It should fix the problem.
 
I tried to run the script, but I get the following errors:

Server: Msg 15190, Level 16, State 1, Procedure sp_dropserver, Line 44
There are still remote logins for the server 'DB-TEST'.
Server: Msg 15028, Level 16, State 1, Procedure sp_addserver, Line 14
The server 'SERVERDB02' already exists.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top