SQL Server Logshipping Error: 14421, Severity: 16, State: 1.

If you’re running log shipping in Microsoft SQL Server, you may encounter the Error: 14421, Severity: 16, State: 1.

2023-02-17 07:32:00.460 spid55       Error: 14421, Severity: 16, State: 1.
2023-02-17 07:32:00.460 spid55       The log shipping secondary database Live has restore threshold of 45 minutes and is out of sync. No restore was performed for 438minutes. Restored latency is 44 minutes. Check agent log and logshipping monitor information.

If you encounter Error: 14421, Severity: 16, State: 1 while running log shipping in Microsoft SQL Server, it could mean that the secondary database is out of sync with the primary database.In log shipping, we maintain a warm standby copy of a database on a secondary server by creating transaction log backups on the primary server and shipping them to one or more secondary servers. However, errors can occur, and the secondary database may not be up to date with the primary database.

In the scenario described, the secondary database “Live” is out of sync and has not been restored for 438 minutes, which is well beyond the restore threshold of 45 minutes. Although the latest transaction log backup has been shipped and restored on the secondary server, it has not yet been applied to the database, which results in a restored latency of 44 minutes.

Resolution:

To resolve the issue, you can try increasing the restore threshold, checking for network and resource issues, or checking for backup/restore issues.

In the scenario described, the issue was resolved by bringing the file share on the cluster used for storing log files online.

In conclusion, log shipping is a valuable technique for maintaining a warm standby copy of a SQL Server database, but errors can occur. By taking a proactive approach to troubleshooting, you can quickly identify and resolve issues that arise, such as Error: 14421, Severity: 16, State: 1.