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

  1. Execute the following commands on the new backup server:

sp_dropserver @server=’sys-A’

sp_addserver @server=’sys-B’, @local=’LOCAL’

  1. Restart the service.

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment