SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 duplicate data
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

DBA007
Posting Yak Master

India
145 Posts

Posted - 11/16/2010 :  08:09:45  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

South Africa
4507 Posts

Posted - 11/16/2010 :  08:23:41  Show Profile  Visit GilaMonster's Homepage  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000