FIX: Incorrect Identity Values After Failed Unique Index Creation (290917)
The information in this article applies to:
- Microsoft SQL Server 2000 (all editions)
This article was previously published under Q290917
BUG #: 351634 (SHILOH_bugs)
BUG #: 351180 (SHILOH_BUGS)
SYMPTOMS
Inserts into a table may fail due to a "duplicate key values" message when all of the following are true:
- A table exists with a UNIQUE INDEX or PRIMARY KEY defined.
- The table contains a column with the IDENTITY property.
- A CREATE INDEX statement is issued for an INDEX that already exists.
CAUSE
The failed CREATE INDEX statement resets the value for the IDENTITY column to its initial seed value.
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 INF: How to Obtain the Latest SQL Server 2000 Service Pack
WORKAROUND
Issue a DBCC CHECKIDENT statement after the failed index creation.
STATUSMicrosoft has confirmed that this is a problem in SQL Server 2000. This problem was first corrected in SQL Server 2000 Service Pack 1.
Modification Type: | Major | Last Reviewed: | 11/6/2003 |
---|
Keywords: | kbBug kbfix kbSQLServ2000sp1fix KB290917 |
---|
|