Quantcast
Channel: SQL Server High Availability and Disaster Recovery forum
Viewing all articles
Browse latest Browse all 4689

Executing @@servername from virtual sql Server does not change after Always On failover

$
0
0

Have a two node cluster: SqlServernode1, SqlServernode2. The virtual name of the sql cluster is SQLMgmt.

Scenario 1

SqlServernode1- AG - Primary

SqlServernode2. - AG -Secondary

SQLMgmt - Select @@servername gives "SqlServernode1"

I do a Failover in SQL Mgmt studio from SqlServernode1 and it succesfully fails over all databases in the AG to SqlServernode2

Scenario 2(After Failover)

SqlServernode1- AG - Secondary

SqlServernode2. - AG -Primary

SQLMgmt - Select @@servername gives "SqlServernode1"

I am expecting @@servername to be "SqlServernode2" after failover. Am I missing anything ? Or I should go to the cluster manager and do the failover from there instead of SQL Mgmt Studio ?


Ranga


Viewing all articles
Browse latest Browse all 4689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>