Original: SQL Server replication requires an actual server name to connect to the server
The machine because the computer name was modified in the way the DAC connection, was changed to Kerry, until recently, due to the computer renamed, the potential problem (the local database only occasionally do the experiment) finally broke out: I use the connection server from other servers to copy the data times wrong, error is as follows: SQL Server replication requires an actual server name to connect to the server. Connections through server aliases, IP addresses, or any other alternate names are not supported. Please specify the actual server name "XXXX". (replication.utilities): Specific situation
Solution : From sys.sysservers view column Svrname can find not a new computer name, the problem is here (). First use sp_dropserver to delete the server, statement: Exec sp_dropserver ' old computer name ' and add new server with sp_addserver, statement: EXEC sp_addserver ' new computer name ', ' LOCAL ' Finally, restart the SQL SERVER service to resolve the issue.
SELECT * fromsys.sysservers
EXECsp_dropserver'20091228-1016\GSP';
GO
EXECsp_addserver'KERRY\GSP';
GO
--or use the following code
IFserverproperty ('servername') <> @ @SERVERNAME
BEGIN
DECLARE @ServerSYSNAME
SET @Server = @ @SERVERNAME
EXECsp_dropserver@server = @Server ;
SET @Server = CAST(SERVERPROPERTY ('servername') asSYSNAME)
EXECsp_addserver@server = @server, @local = 'LOCAL'
END
SQL server replication requires an actual server name to connect to the server