FIX: "Could not redo log record" error and log shipping stops working after an automatic failover in SQL Server 2008 R2

Applies to: SQL Server 2008 R2 Service Pack 2SQL Server 2008 R2 EnterpriseSQL Server 2008 R2 Developer

Symptoms


Assume that you set up an environment that combines log shipping and database mirroring in Microsoft SQL Server 2008 R2. The database mirroring is running in high-safety mode and automatic failover is configured. In this situation, after an automatic failover, the log shipping may stop working, and the following error is logged in the SQL Server error log: 
<Date><Time> spid#  Error: 3456, Severity: 16, State: 1.
<Date><Time> spid#  Could not redo log record (#), for transaction ID (#), on page (#), database '<DatabaseName>' (database ID #). Page: LSN = (#), type = #. Log: OpCode = #, context #, PrevPageLSN: (#). Restore from a backup of the database, or repair the database.
<Date><Time> spid#  Using 'dbghelp.dll' version '4.0.5'
<Date><Time> spid#  **Dump thread - spid = 0, EC = 0x0000000A928F20F0
<Date><Time> spid#  ***Stack Dump being sent to <FilePath>\SQLDump0045.txt
<Date><Time> spid#  * *******************************************************************************
<Date><Time> spid#  *
<Date><Time> spid#  * BEGIN STACK DUMP:
<Date><Time> spid#  *   <Date><Time> spid# 
<Date><Time> spid#  *
<Date><Time> spid#  * HandleAndNoteToErrorlog: Exception raised, major=34, minor=56, severity=16
Additionally, some dump files are generated on the log shipping server.

Resolution


The issue was first fixed in the following cumulative update of SQL Server.

Cumulative Update 9 for SQL Server 2008 R2 SP2

Status


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.