FIX: Error message 9004 may occur when you restore a log that does not contain any transactions

Article translations Article translations
Article ID: 324469 - View products that this article applies to.
This article was previously published under Q324469
BUG #: 358990 (shiloh_bugs)
BUG #: 102715 (SQLBUG_70)
Expand all | Collapse all

On This Page

SYMPTOMS

Restoring transaction log backups, which were created in Microsoft SQL Server 7.0, that do not contain any transactions but do shrink the transaction log files, can cause the following error message to occur when subsequent transaction log backups are restored:
Server: Msg 9004, Level 21, State 3 The log for database '<database name>' is corrupt.

RESOLUTION

SQL Server 2000

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

SQL Server 7.0

The English version of this hotfix has the file attributes (or later file attributes) 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.
   Date        Time   Version    Size       File name     Comment
   -----------------------------------------------------------------------------------
   2002-06-14  20:46  7.00.1033  5,054,736  Sqlservr.exe  SQL Server 7.0 SP3-based fix
   2002-02-14  17:37  7.00.1021    586,000  Sqlsort.dll   SQL Server 7.0 SP3-based fix
Note Because of file dependencies, the most recent hotfix or feature that contains the files may also contain additional files.

WORKAROUND

To work around this behavior, you can either:
  • Disable the autoshrink option by using the sp_dboption stored procedure in SQL Server 7.0.

    -or-
  • Create a full or differential database backup so that the problem transaction logs do not have to be restored.

STATUS

SQL Server 2000

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. This problem was first corrected in SQL Server 2000 Service Pack 3.

MORE INFORMATION

To identify this problem you can use the RESTORE HEADERONLY and the RESTORE FILELISTONLY commands to query the transaction log backups. In this case, the LastLsn column values from the RESTORE HEADERONLY output of consecutive transaction log backups have the same value, and the Size column value from the RESTORE FILELISTONLY output shows a smaller value in the latter transaction log backup.

This problem does not occur with backups that originate in SQL Server 2000.

Properties

Article ID: 324469 - Last Review: October 12, 2005 - Revision: 5.1
APPLIES TO
  • Microsoft SQL Server 2000 Standard Edition
  • Microsoft SQL Server 7.0 Standard Edition
Keywords: 
kbhotfixserver kbsqlserv2000sp3fix kbbug kbfix kbqfe kbsqlserv700presp5fix KB324469

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com