Microsoft KB Archive/278366

From BetaArchive Wiki
Knowledge Base


FIX: Concurrent Shrink Operations Against Heaps Can Result in Errors 8968, 8905, and 8906

Article ID: 278366

Article Last Modified on 3/14/2006



APPLIES TO

  • Microsoft SQL Server 7.0 Standard Edition



This article was previously published under Q278366

BUG #: 58198 (SQLBUG_70)

SYMPTOMS

Concurrent shrink operations (DBCC SHRINKDATABASE or DBCC SHRINKFILE) against a database that contains tables without a clustered index (heaps) can result in the following errors when executing DBCC CHECKALLOC:

Server: Msg 8906, Level 16, State 1, Line 0
Page (1:947) in database ID 5 is allocated in the SGAM (1:3) and PFS (1:1), but was not allocated in any IAM. PFS flags 'MIXED_EXT ALLOCATED 95_PCT_FULL'.

Server: Msg 8905, Level 16, State 1, Line 0
Extent (1:960) in database ID 5 is marked allocated in the GAM, but no SGAM or IAM has allocated it.

Server: Msg 8968, Level 16, State 1, Line 0
Table Corrupt: IAM page (1:1041) (object ID 1413580074, index ID 0) is out of the range of this database.

and in addition this error when running CHECKDB:

Server: Msg 7965, Level 16, State 1, Line 0
Table corrupt: Could not check object ID 1413580074, index ID 0 due to invalid allocation (IAM) page(s).


WORKAROUND

Serialize all execution of DBCC SHRINKFILE and SHRINKDATABASE against a database or file.

STATUS

Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 3 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

274799 INF: How to Obtain Service Pack 3 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0


For more information, contact your primary support provider.

MORE INFORMATION

Any attempt to SELECT, INSERT, UPDATE, or DELETE from this table can result in the following error:

Error: 5180, Severity: 22, State: 1
Could not open FCB for invalid file ID 0 in database 'pubs'. Table or database may be corrupted..


When this problem occurs, one or more of the users executing the shrink can fail with a 8968 error that is eventually reported by CHECKDB or CHECKALLOC.

Another side affect of this problem is that unusual growth of tempdb may occur. Depending on the configured size of tempdb and the available disk space, a user can encounter Error 1105 because any allocation objects that are part of these errors cannot be reused.

DBCC CHECKDB or CHECKALLOC with REPAIR should correct these errors. DBCC UPDATEUSAGE should then be used to also correct sysindexes entries.


Additional query words: 8968 8905 8906

Keywords: kbbug kbfix KB278366