WIN2008 R2 installed on the server, and then did not care about the machine name. After installing the SQL2008 R2 database, the machine name was changed when configuring the AD domain.
Then, when you start configuring database mirror synchronization, you try database replication publishing first, and the result indicates that “SQL Server replication requires an actual server name to connect to the server. Connections via server aliases, IP addresses, or any other alternate name are not supported. Please specify the actual server name…”, as shown in the following figure.
After checking on the Internet, some students concluded that the machine name was incorrect, which reminded me that the machine name had been corrected before, but the example in this link database was an address in the form of IP or alias. Well, the solution is as follows:
1. Check the name of the server (machine) and execute in the default or unnamed instance of the database:
use mastergoselect @@servername;select serverproperty('servername')
2. If it is found that the server name obtained by the above-mentioned SQL query does not match the actual computer name, the following is executed:
sp_dropserver 'old_server_name'gosp_addserver 'current_computer_name','local'
3. Re-execute step 1, and find that the server name has not changed or displayed as a null value, restart the SQL SERVER service. Finally, step 1 is executed and the server name is displayed properly.
Note: If there are multiple instances, each instance should go through the above three steps separately.