FIX: Error Message 5180 May Occur When You Retrieve Text or Image Data

This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 236001 (shiloh_bugs)
Symptoms
Reading a big text or image column within a session, which has the isolation level set to READ UNCOMMITED, may cause the following error message to occur:
Error: 5180, Severity: 22, State: 1
Could not open FCB for invalid file ID 0 in database '%s'. Table or database may be corrupted.
Cause
A text or image column is returned to the client in a sequence of text blocks. The size of those blocks is limited by the network packet size. If the row holding the text or image column happens to be deleted by another session while the other client still has not retrieved all text blocks, the pages previously assigned to the text data might get allocated by another session and be overwritten by this session.

In this case, the dirty reader might not become aware of this fact and continue to read text chunks from the deleted row. However, because some of the text data pages were overwritten with arbitrary data, the pointer to the next text page might also become corrupted and thus an invalid page number is being referenced. The 5180 error message occurs due to an invalid file ID in the page number. Other errors might also occur, depending on the kind of corruption being introduced by the writer.
Resolution
To resolve this problem, obtain the latest service pack for SQL Server 2000. For additional information, click the following article number to view the article in theMicrosoft Knowledge Base:
290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack
Workaround
To work around this problem, do not perform dirty reads on text or image data.
Status
Microsoft has confirmed that this is a problem in SQL Server 2000. This problem was first corrected in SQL Server 2000 Service Pack 1.
More information
Although the error message warns of possible data corruption, the data in the database has not actually been tampered with.

REFERENCES

For additional information on this problem in SQL Server 7.0, click the article number below to view the article in the Microsoft Knowledge Base:
276041 FIX: Retrieving Text/Image Data May Return Error 5180
error 5180
Properties

Article ID: 276043 - Last Review: 01/16/2015 20:53:45 - Revision: 4.0

Microsoft SQL Server 2000 Standard Edition

  • kbnosurvey kbarchive kbbug kbfix kbsqlserv2000sp1fix KB276043
Feedback