The error message is as follows:
SQL Server cannot connect to server "server1 ". (New release wizard)
SQL Server replication requires an actual server name to connect to the server. Connection by server alias, IP address, or any other backup name is not supported. Specify the actual server name "SRV ". (Replication. Utilities)
The solution is as follows:
If serverproperty ('servername') <> @ servername
Begin
Declare @ server sysname
Set @ server =servername
Exec sp_dropserver @ Server = @ Server
Set @ Server = cast (serverproperty ('servername') as sysname)
Exec sp_addserver @ Server = @ server, @ local = 'local'
End
Cause:
After the database is installed, the name of the operating system has been changed. As a result, the host name stored in the database is inconsistent with the existing host name. In this example, we can see that the host is originally called SRV and later changed to server1.