Forum Discussion
2016 SQL Standard - Always on Availability Group questions
With further investigations, it looked like the SQL Accounts were getting orphaned after failover and was failing at login. After using:
exec sp_change_users_login 'auto_fix'
I was able to get access to the database. As a test, I failover again and the accounts got orphaned again. Trying to determine why the accounts get orphaned after a failover now.
Hi The_Boz -- This is most likely occurring because the SQL logins were created separately on each Availability Group node. When a SQL login is created, a unique SID is also created.
So while the SQL login names may be identical on each Availability Group node, the SIDs likely are not which is what is causing the orphaning.
You can use the process outlined at this link to transfer logins between the Availability Group nodes while maintaining the same SID. Take care.