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...