FIX: A RESTORE DATABASE WITH RECOVERY Statement Can Fail with Error 9003 or Error 9004

This article was previously published under Q328354
This article has been archived. It is offered "as is" and will no longer be updated.
When you run a RESTORE DATABASE WITH RECOVERY statement to bring a standby server online, you might receive one of the following error messages:

Error: 9003
The LSN %S_LSN passed to log scan in database '%.*ls' is invalid.

Error: 9004
An error occurred while processing the log for database '%.*ls'.
This problem occurs because physical characteristics (virtual log parity) for inactive virtual log files in the transaction log are not preserved when a full database backup is restored.

To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack


Note The following hotfix was created before the release of Microsoft SQL Server 2000 Service Pack 3.

The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
   Version      File name   ------------------------------   8.00.678     Sqlservr.exe    				
Note Because of file dependencies, the most recent hotfix or feature that contains the files may also contain additional files.

To avoid this problem, reinitialize the primary and the standby servers by using the same full database backup. This ensures that the parity for all the virtual log files on both systems is equivalent.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section of this article.

This problem was first corrected in SQL Server 2000 Service Pack 3.
After you apply the fix for this problem, you must restore a full database backup on the standby server.
For more information about standby servers, see the "How to set up, maintain, and bring online a standby server" topic in the SQL Server documentation.

For more information about the WITH RECOVERY option of the RESTORE command, see the SQL Server documentation that describes the syntax for the Transact-SQL RESTORE command.

Article ID: 328354 - Last Review: 12/07/2015 12:25:26 - Revision: 8.2

Microsoft SQL Server 2000 Standard Edition

  • kbnosurvey kbarchive kbhotfixserver kbqfe kbbug kbfix kbsqlserv2000presp3fix kbsqlserv2000sp3fix KB328354