Article ID: 276043 - View products that this article applies to.
This article was previously published under Q276043
BUG #: 236001 (shiloh_bugs)
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.
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.
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 the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/290211/EN-US/ )INF: How to Obtain the Latest SQL Server 2000 Service Pack
To work around this problem, do not perform dirty reads on text or image data.
Microsoft has confirmed that this is a problem in SQL Server 2000. This problem was first corrected in SQL Server 2000 Service Pack 1.
Although the error message warns of possible data corruption, the data in the database has not actually been tampered with.
REFERENCESFor additional information on this problem in SQL Server 7.0, click the article number below to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/276041/EN-US/ )FIX: Retrieving Text/Image Data May Return Error 5180