Symptom
When using SQL 2008, after a switchover or a failover, the variable servername still points to the primary system.
Solution
You can use “select SERVERPROPERTY(‘ServerName’)” instead of using the variable @ @servername. This query will return the correct name of the machine after a switchover or failover.
or
- Execute the following commands on the new backup server:
sp_dropserver @server=’sys-A’
sp_addserver @server=’sys-B’, @local=’LOCAL’
- Restart the service.
このトピックへフィードバック