I am not able to repair my database due to below errors, when I run dbcc checkdb(DBNAME, REPAIR_ALLOW_DATA_LOSS)
I am getting the errors listed here.
When I run a select query for these key values, it returns only one row, but when I run dbcc checkdb(DBNAME, REPAIR_ALLOW_DATA_LOSS)
these errors are thrown:
Msg 1505, Level 16, State 1, Line 2
The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.MSmerge_contents' and the index name 'uc1SycContents'. The duplicate key value is (7696031, 08703987-557d-e111-9888-e61f13c44f03).
Msg 1505, Level 16, State 1, Line 2
The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.MSmerge_contents' and the index name 'nc2MSmerge_contents'. The duplicate key value is (424222, 7696031, 08703987-557d-e111-9888-e61f13c44f03).
Msg 1505, Level 16, State 1, Line 2
The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.MSmerge_contents' and the index name 'nc4MSmerge_contents'. The duplicate key value is (08703987-557d-e111-9888-e61f13c44f03, 7696031).
Msg 1505, Level 16, State 1, Line 2
The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.MSmerge_contents' and the index name 'nc3MSmerge_contents'. The duplicate key value is (-425819, 7696031, bf8a5a9c-6f7d-e111-9888-e61f13c44f03).
Msg 2601, Level 14, State 1, Line 2
Cannot insert duplicate key row in object 'dbo.MSmerge_genhistory' with unique index 'unc1MSmerge_genhistory'.
Msg 1505, Level 16, State 1, Line 2
The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.MSmerge_genhistory' and the index name 'unc1MSmerge_genhistory'. The duplicate key value is (236bfa48-965e-4a65-b4cd-ac527de04d1b, ).
How can I repair my database?