Always On configuration with 2 Azure SQL VMs and Cloud Witness.
Server1 - Primary Node
Server2 - Secondary Node
Listener1 - AlwaysOn Listener
I connect to SQL instance through Listener1. All looks good, database synchronized and accessible, replicas are in sync and all is healthy in AlwaysOn Dashboard.
SELECT @@SERVERNAME
Shows - Server1.
Now I failover.
Disconnect from Listener1 in SSMS. Connect to Listener1 in SSMS. Run same command:
SELECT @@SERVERNAME
Shows - Server2.
But now database becomes inaccessible:
The database AdventureWorks2016 is not accessible. (ObjectExplorer)
AlwaysOn Group shows as secondary and Server2 with question mark:
Is this normal behavior, what could be wrong?
Thanks