Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 duplicate data

Author  Topic 

DBA007
Posting Yak Master

145 Posts

Posted - 2010-11-16 : 08:09:45
In one of a table for a particular database,we have lot of duplicate data,iam not able to remove it as i cant identify whare exactly the duplicates are and the data is huge,when i ran DBCC checkdb on the particular database i got the below error messages,any help on this is really helpful


Msg 1505, Level 16, State 1, Line 1
The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.Detail' and the index name 'PK_Detail'. The duplicate key value is (5635879).
Msg 1505, Level 16, State 1, Line 1
The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.Detail' and the index name 'IDX_TC_ID'. The duplicate key value is (261208, 5635879).
Msg 1505, Level 16, State 1, Line 1
The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.Detail' and the index name 'IDX_STATUS_ID'. The duplicate key value is (112, 5635894).
Msg 1505, Level 16, State 1, Line 1
The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.Detail' and the index name 'IX_Detail_TaskID'. The duplicate key value is (276, 5635889).
Msg 1505, Level 16, State 1, Line 1
The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.Detail' and the index name 'idx_Submitted'. The duplicate key value is (<NULL>, 5635879).

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2010-11-16 : 08:23:41
You need to manually delete the duplicate rows (or change the key values) and then recreate those unique indexes/pks

More corruption? What do you do to your databases that you have so much corruption?

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -