SQL Server Error Code – 4221 login to read-secondary failed due to lo

In this blog post, you’ll learn more about the SQL Server Error Code 4221 and the error message description that is shown

SQL Server Error Code

4221

SQL Server Error Description for the Code :4221

Login to read-secondary failed due to long wait on ‘HADR_DATABASE_WAIT_FOR_TRANSITION_TO_VERSIONING’. The replica is not available for login because row versions are missing for transactions that were in-flight when the replica was recycled. The issue can be resolved by rolling back or committing the active transactions on the primary replica. Occurrences of this condition can be minimized by avoiding long write transactions on the primary.

Leave Your Comment