Error:
You will see the secondary replica is disconnected error as:
Solution:
In this case go to SQL server and check the ERROR log and see the exact error:
Error Log location:
C:\Program Files\Microsoft SQL Server\<MSSQL15.MSSQLSERVER>\MSSQL\Log
I am able to see the error as :
GO
CREATE LOGIN [RAN\SQL-AG-VM-Node1$] FROM WINDOWS
GO
GRANT CONNECT ON ENDPOINT::hadr_endpoint TO [RAN\SQL-AG-VM-Node1$];
GO
On Node2 run SQL query
GO
CREATE LOGIN [RAN\SQL-AG-VM-Node2$] FROM WINDOWS
GO
GRANT CONNECT ON ENDPOINT::hadr_endpoint TO [RAN\SQL-AG-VM-Node2$];
GO
Now try a failover and you will see both in CONNECTED
No comments:
Post a Comment