SQL Server error code
SQL Server error 4221
SQL Server raises error 4221 at severity 16, which marks a problem with the query or data that you can correct.
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.
| Msg | 4221 |
|---|---|
| Severity | 16 |
| Group | 4000–4999 |