Select the product you need help with
FIX: Table Creation, Row Insertion, and Index Creation Inside Transaction, Followed By Addition of Constraint May Result in Consistency ErrorsArticle ID: 286749 - View products that this article applies to. This article was previously published under Q286749
BUG #: 351939 (SHILOH_bugs)
SYMPTOMS
When you open a transaction, create a table, insert rows, create an index on the table, commit the transaction, and then add a constraint, a subsequent DBCC CHECKTABLE may report consistency errors. The DBCC CHECKTABLE may return results similar to:
Server: Msg 8970, Level 16, State 1, Line 2 Row error: Object ID 2041058307, index ID 0, page ID (1:77), row ID 0. Column 'LastModified' was created NOT NULL, but is NULL in the row. Server: Msg 8970, Level 16, State 1, Line 2 Row error: Object ID 2041058307, index ID 0, page ID (1:77), row ID 1. Column 'LastModified' was created NOT NULL, but is NULL in the row. Server: Msg 8970, Level 16, State 1, Line 2 Row error: Object ID 2041058307, index ID 0, page ID (1:77), row ID 2. Column 'LastModified' was created NOT NULL, but is NULL in the row. DBCC results for '#TableX_____________________________000000000011'. There are 0 rows in 1 pages for object '#TableX______________________________________________000000000011'. CHECKTABLE found 0 allocation errors and 3 consistency errors in table '#TableX________________________000000000011' (object ID 2041058307). repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKTABLE (tempdb.dbo.#TableX________________________________________000000000011 ). A message similar to the following is logged in the SQL Server error log:
(tempdb.dbo.#TableX______________________________000000000011) executed by <DOMAIN>\<user> found 3 errors and repaired 0 errors.
RESOLUTIONTo 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:
290211
(http://support.microsoft.com/kb/290211/EN-US/
)
INF: How to Obtain the Latest SQL Server 2000 Service Pack
WORKAROUND
To work around this problem, use any of the following methods:
STATUSMicrosoft 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
To reproduce the problem, run the following script:
PropertiesArticle ID: 286749 - Last Review: October 17, 2003 - Revision: 3.2
|


Back to the top








