Applications cannot login to moved db with Error: 18456 Severity: 14 State: 38 after AG failover

Andrea Floriddia 0 Reputation points
2026-06-29T08:21:31.8566667+00:00

IaaS SQL Server on 2-node cluster with Always On
Manual AG failover was successfull but applications can no longer connect. SQLServer logs report "Error: 18456 Severity: 14 State: 38" and
"Login failed for user 'app_rh_sso'. Reason: Failed to open the explicitly specified database 'RH_SSO'"

Failing back the AG the application reconnect successfully

What could be the causes? I discovered that the login on the other node has a different SID compared to the database user. Could this be the reason?

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories

0 comments No comments

1 answer

Sort by: Oldest
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.