Recently our operational team had to do a restore of a database for BizTalk. These databases require a special restore routine, to let the BizTalk components in sync with the DB.

First they restored the latest full backup, which went without problems.

Then they needed to restore the transaction log backups, with the STOPATMARK option set:

RESTORE LOG [Database] FROM

DISK = N’LocationOfBackupFile’

WITH FILE = 1, NOUNLOAD, STATS = 10,

STOPATMARK = N’BTS_2011_06_06_00_00_29_087′ AFTER N’2011-06-06T02:00:32′

GO

which results in an error:

100 percent processed.

Processed 0 pages for database ‘Database’, file ‘Database’ on file 1.

Processed 2 pages for database ‘Database’, file ‘Database_log’ on file 1.

Location:     diskio.c:1769

Expression:   filepos + cBytes <= (DWORDLONG) m_size << PAGESIZEBITS

SPID:         65

Process ID:   1908

Msg 3013, Level 16, State 1, Line 1

RESTORE LOG is terminating abnormally.

Msg 3624, Level 17, State 1, Line 1

A system assertion check has failed. Check the SQL Server error log for details. Typically, an assertion failure is caused by a software bug or data corruption. To check for database corruption, consider running DBCC CHECKDB. If you agreed to send dumps to Microsoft during setup, a mini dump will be sent to Microsoft. An update might be available from Microsoft in the latest Service Pack or in a QFE from Technical Support.

When restoring the log without the STOPATMARK option, no problems are encountered.

The log mark entries where all filled in correctly. You can see this by querying the dbo.logmarkhistory table in msdb.

We opened a case at Microsoft and they confirmed that this is a bug and is fixed in CU4 for SQL 2008 SP2 (http://support.microsoft.com/kb/2527180). I’ve asked for more information, but they cannot provide it for the moment as it is confidential. I still hope to find some more information though, I’ll update this post with the details.

Tom

Bookmark and Share