Article ID: 200795 - View products that this article applies to.
This article was previously published under Q200795
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 53836 (SQLBUG_70)
When a table contains a foreign key that references a column other than the first column in the parent table, DBCC CHECKCATALOG may incorrectly report error 2513.
Create the parent table so that the primary key constraint can be placed on the first column of the table.
Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 2 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
254561For more information, contact your primary support provider.
(http://support.microsoft.com/kb/254561/ )INF: How to Obtain Service Pack 2 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0
To determine if the error reported is legitimate, manually test the foreign key constraint to see if it is being enforced correctly. For example, try inserting a record into the foreign key table with a value that does not have a corresponding entry in the primary key table. If the insertion fails, then the foreign key constraint is being enforced correctly and the 2513 error message can be ignored. However, if the insertion succeeds, then the foreign key constraint is not being enforced correctly and the 2513 error message is legitimate.
See SQL Server Books Online for further information regarding error message 2513.
Contact us for more help