"SQL Server replication requires a real server name to connect to the servers, please specify the actual server name" go
? SQL Server replication requires an actual server name to connect to the server, please specify the actual server name ? 2014-06-12 12:01:10
recently learning Advanced replication technology for SQL Server
The original in their local instance is all normal operation, the remote server received this problem, and later found on the internet, there are two cases:
one, its own computer name has been modified, resulting in inconsistent with the server.
Second, when connecting to the remote server directly with the IP address, if you do not use the alias to connect, you will receive the above Error prompt box.
In the first case:
Execute the following statement inside SQL Server:
Use master Go [email protected] @servername; Select?serverproperty (' servername ') |
Use the above statement to query the name of the server and the name of the actual computer, if the two are inconsistent, you need to modify.
Inconsistent, execute the following statement:
sp_ Dropserver ' old_server_name ' go sp_addserver ' Current_computer_name ', ' local '
When you are finished modifying, restart the SQL Server service.
In the second case:
Add an alias to the remote server and use an alias instead of an IP address to connect to the remote database server. (I'm using SQL SERVER2012 myself)
Open the Configuration Manager for SQL SERVER2012 and navigate to the Aliases service option, as follows:
Right-click---> New alias:
The "Alias" here uses the server name, which is the name queried by the SQL statement above: (select? ). @ @servername;), the IP address is the access address for this server.
Then add the corresponding IP address and alias to the hosts in this machine:
C:\Windows\System32\drivers\etc
Hosts
IP address????? ? Alias
For example:
172.168.1.15?? Sniper
Finish modifying, save.
When you are finished modifying the SQL Server service, restart it.
When connecting again, use "Alias" instead of IP address to connect to the server:
At this point, the problem solved!
(later in some tests, I found that no aliases, as long as the specific name of the server can be connected)
SQL Server replication requires an actual server name to connect to the servers, please specify the actual server name "go