PRB: System Tables Missing Primary Key Information After Upgrade from SQL Server 6.x to SQL Server 7.0 or SQL Server 2000 (281126)
The information in this article applies to:
- Microsoft SQL Server 6.5
- Microsoft SQL Server 7.0
- Microsoft SQL Server 2000 (all editions)
This article was previously published under Q281126 SYMPTOMS
The primary key (PK) constraint for some user tables may not upgrade correctly from Microsoft SQL Server 6.5 to Microsoft SQL Server 7.0 or to Microsoft SQL Server 2000.
After an upgrade from Microsoft SQL Server 6.5 to Microsoft SQL Server 7.0 or to Microsoft SQL Server 2000, the new Microsoft SQL Server upgraded user database may not have the primary key constraint on some user tables as a consequence of the following Microsoft SQL Server 6.5 conditions:
CAUSE
The primary key constraint does not show up in the upgraded SQL Server user database user tables, because there is missing data in the sysobjects system table for the user database on the 6.5 SQL Server server.
The Category column in the sysobjects system table is missing the bit 512 (0x200), which means that the table has a primary key constraint. Otherwise, Generate SQL Script generates a script for the creation of the primary key constraint.
A primary key constraint needs to have: - The Status column in the sysconstraints system table must be set to 1.
- The Category column in the sysobjects system table must have the bit 512 (0x200) set.
- The Colid column in the sysobjects system table must be set to 0.
WORKAROUND
Here are two methods you can use to work around this behavior:
Modification Type: | Major | Last Reviewed: | 11/14/2003 |
---|
Keywords: | kbprb kbSQLProg KB281126 |
---|
|