22
Illegal attempt to insert duplicate key row in the clustered index for object ’%.*s’ in database ’%.*s’.
Error 2626 is raised when you attempt to insert a row into a table with a clustered index, and the key value being inserted matches an existing index key value, which was unexpected.
Error 2626 can be caused by:
A corrupt clustered index
An Adaptive Server problem
Corrective action depends on the type of table, and whether the table is partitioned. If the problem persists after applying the correction, call Sybase Technical Support.
Unpartition the table:
1> alter table <table_name> unpartition 2> go
Where <table_name> is the object named in the message text.
Repartition the table:
1> alter table <table_name> partition <number_of_partitions> 2> go
If the object encountering the error is a system table, perform the procedure in “Fixing a system table corrupted index” in the Troubleshooting and Disaster Recovery guide to repair the index. Then go to step 5.
If the object encountering the error is a user table, identify the clustered index on the table:
1> sp_helpindex <table_name> 2> go
Where <table_name> is the object named in the message text.
To ensure that the information needed to re-create the index is available, run sp_helpindex on the index prior to dropping it.
Drop the index, then re-create the index, or create a non-clustered index. This eliminates the 2626 error in most cases.
Run dbcc checktable on the table to verify that the corruption is gone.
All versions