Microsoft KB Archive/315875

= BUG: SQL Server Enterprise Manager Creates a Nonclustered Index for a PRIMARY KEY Constraint =

Article ID: 315875

Article Last Modified on 7/18/2002

-

APPLIES TO


 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q315875



BUG #: 102200 (sqlbug_70)



SYMPTOMS
If you use SQL Server 7.0 Enterprise Manager to create a PRIMARY KEY constraint, Enterprise Manager creates a unique nonclustered index to implement the primary key if a clustered index does not exist. By default, SQL Server Enterprise Manager creates a unique, clustered index if a clustered index does not exist.



WORKAROUND
To work around this behavior, create the PRIMARY KEY constraint with Transact-SQL statements. Drop the PRIMARY KEY constraint, re-create it with the ALTER TABLE statement, and then specify a clustered index.

For example: alter table testA drop constraint PK_testA go ALTER TABLE testA WITH NOCHECK ADD CONSTRAINT PK_testA PRIMARY KEY CLUSTERED ( a )



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Additional query words: SEM NC TSQL SS EM T-SQL

Keywords: kbbug kbpending KB315875

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.