Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm trying to synchronize a couple tables in one SQL Server 2000 database into another SQL Server 2005 database using replication.

When I am attempting to set up my SQL Server as a distributor, I'm getting the following error:

SQL Server Enterprise Manager could not configure 'VIPER' as the Distributor for 'VIPER' .
Error 18483: Could not connect to server 'VIPER' because 'distributor_admin' is not defined as a remote login at the server.

In doing research, I found several sources and articles that show that my machine name, and the actual name of the server are not the same. When I check the sysservers view in master, I see that:

0   1089    VMSSERV SQL Server  SQLOLEDB    VMSSERV         4/23/2008 9:50:41 AM    
1   1601    repl_distributor    SQL Server  SQLOLEDB    VIPER           10/12/2011 1:23:18 PM   
2   1184    CHARLIE SQL Server  SQLOLEDB    CHARLIE         2/18/2011 1:32:14 PM

The first line is the original database that was setup, and that I intend on using. You can see (kinda) that the original name is VMSSERV and the actual machine name is VIPER.

So, from the results of my extensive web search, I ran this in Query Analyzer:

USE MASTER
GO
SELECT @@SERVERNAME, SERVERPROPERTY('ServerName')

This returns:

VMSSERV VIPER 

Most of my web searches show that I should refer to http://support.microsoft.com/kb/818334, which instructs to use:

-- Use the Master database
USE master
GO

-- Declare local variables
DECLARE @serverproperty_servername  varchar(100), 
    @servername             varchar(100)

-- Get the value returned by the SERVERPROPERTY system function
SELECT @serverproperty_servername = CONVERT(varchar(100), SERVERPROPERTY('ServerName'))

-- Get the value returned by @@SERVERNAME global variable
SELECT @servername = CONVERT(varchar(100), @@SERVERNAME)

-- Drop the server with incorrect name
EXEC sp_dropserver @server=@servername

-- Add the correct server as a local server
EXEC sp_addserver @server=@serverproperty_servername, @local='local'

And finally my actual question...

Would my correct format to fixing this be on the last line of the above sequence:

EXEC sp_addserver @server = @serverproperty_servername, @local = 'VIPER'

?

Once I perform this task, if there are further errors, I will reply back. Hopefully this ONE item will fix my issue...

share|improve this question
add comment

migrated from stackoverflow.com Oct 15 '11 at 6:32

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 1 down vote accepted

The SQL Server was probably renamed in the past. Here's a better article from Microsoft on how to change the server names:

http://msdn.microsoft.com/en-us/library/ms143799.aspx

share|improve this answer
    
I had to do several things from the above link. I had to rename the server, which then presented an error. I then had to do it with out a variable associated, reran the query and it changed the name. –  RogueSpear00 Oct 27 '11 at 20:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.