SQL server replication requires an actual server name to connect to the server

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.