New to a company to work, not very familiar with the server condition. Yesterday boss asked me to investigate whether two servers meet the conditions of transactional replication.
As a result, an attempt was made to create a new publication directly on the server, resulting in a header error message: SQL Server replication requires an actual server name to connect to the server. Please specify the actual server name "AAA". (replication.utilities)
I'm sure the server changed its name, and I've heard about it before in the group.
Baidu on a search, basically are the following solutions:
IFSERVERPROPERTY ('SERVERNAME')<> @ @SERVERNAME BEGIN DECLARE @SERVERSYSNAMESET @SERVER = @ @SERVERNAME EXECSp_dropserver@SERVER = @SERVER SET @SERVER = CAST(Serverproperty ('SERVERNAME') asSYSNAME)EXECsp_addserver@SERVER = @SERVER,@LOCAL = 'LOCAL' END UseMASTERGO SELECT @ @SERVERNAME SELECTSERVERPROPERTY ('SERVERNAME')
But my server condition is:serverproperty (' SERVERNAME ') and @ @SERVERNAME result is the name "AAA", and I can only use the name "BBB" Landing ...
This method cannot be used to solve my problem. It seems that I have entered my own trap.
--------------------------------------------------------------------the Ugly dividing line----------------------------------------------- ---------------------------------
Later found that:
1. I can not use "AAA" landing, because I am remote landing, and "AAA" located in the IDC room, and I am not a network segment, Remote Desktop Connection directly in the server local can use "AAA" landing.
2. The name "BBB" should be a name resolved in DNS for the "AAA" server. So remote can connect.
3. Replication is locally configured directly on the server. (Of course, "AAA" landing)
Result: I don't have to make any changes at all ... Oneself by "BBB" This DNS resolves the name to cheat.
SQL Server replication requires an actual server name to connect to the server. Please specify the actual server name