FIX: DBCC DBREINDEX might cause system table referential integrity problems (2513 error) (260742)
The information in this article applies to:
This article was previously published under Q260742 BUG #: 57791 (SQLBUG_70) SYMPTOMS DBCC DBREINDEX may cause system table referential integrity
problems (a 2513 error message), and allow you to drop a referenced primary key
constraint, if the following conditions are met:
- A clustered index exists on the first
table.
- A non-clustered index or statistic exists on the first
table.
- A non-clustered primary key is created on the first table
such that it has a greater index identifier (indid) than the index or statistic
created in the second item of this list.
- A foreign key exists on the second table that references
the primary key of the first table.
- The non-clustered index or statistic created in the second
item of this list is dropped.
- DBCC DBREINDEX is run on the first table.
NOTE:
- It is possible to drop the primary key constraint on the
first table, even if it is referenced by the foreign key constraint on the
second table.
- A delete on the first table may cause a handled Access
Violation (AV).
- If you run DBCC CHECKCATALOG against this database, the
2513 error message occurs.
Note Sometimes, DBCC CHECKDB, DBCC CHECKALLOC, and DBCC NEWALLOC statements may not report corruption even though the same problem exists. CAUSE The indid of the nonclustered primary key index has
changed, and this change is not reflected in the sysreferences system table. WORKAROUND Update the sysreferences system table so that the index id of the nonclustered index of
the primary key is now the correct one. You must also update the rkeyindid of
the sysreferences system table.
Please note that applying the service
pack will prevent the problem from being created again. However, you will
continue to get the access violations, even on SP3, until the above steps are
implemented. 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 additional information about how to download and install the latest SQL Server service pack, click the following article number to view the article in the Microsoft Knowledge Base:
301511
How to obtain the latest SQL Server 7.0 service pack
For more information, contact your primary support provider.
Modification Type: | Major | Last Reviewed: | 12/30/2004 |
---|
Keywords: | kbBug kbCodeSnippet kbfix KB260742 |
---|
|