New User ? Sign Up  |  Sign In  |  Help
ask
answer
discover
     
Search for questions :
My Profile
Categories

mariarita

Open Question Bookmark and Share

SQL Server Table Corrupted after Inserting Duplicate Rows ?

After having inserted the duplicate rows, I tried to access the table but instead of viewing the data, I was denied access to it. So I ran the DBCC CHECKTABLE command and it gave me the following error message:

Server: Msg 8951, Level 16, State 1, Line 0
Table Corrupt: Table ‘table_name’ (ID 1797581442). Missing or invalid key in index ‘IDX_2′ (ID 2) for the row:
Server: Msg 8955, Level 16, State 1, Line 0
Data row (1:97:0) identified by (RID = (1:97:0) ) has index values (Col1 = 1 and Col2 = 1 and Col3 = 12 and Col4 = Sep 30 2000 12:00AM!t~0WeG).
The aforesaid message was All Greek to Me as I could not understand a single thing of it. Can anybody explain to me the reason behind this cause and the way to fix this problem? Any help would be greatly admired.

516 day ago

    Comment(s) (0)
    Report Abuse
   Find Intereseting  
   E-Mail to Friends  
   Bookmark  
   Subscribe to Answer Alert  
No comments yet !!!     Be the first to comment
Answers (1)

RozyRoy
The main reason could be the bulky copy operation that you used and hence it has corrupted the non clustered index pages. In order to fix the problem, you need to clean the target table by removing the non clustered index. Once you have done this, you will have to remove the duplicate rows and have to make a unique non clustered index page. I am sure that by going through the aforesaid procedure you would be able to fix the problem and restore all the contents present in the table. If the problem continues and you are unable to access the MDF files, then the only solution left for you would be to use any good 3rd party sql database recovery software.

I really wish you don’t have to use any software and the problem of yours gets fixed as soon as possible. Best of Luck!!


Posted 516 days ago

( 0 )
( 0 )
    Comment(s) (0)
   Report Abuse
No comments yet !!! Be the first to comment on this answer !!!

Email this question link to friends
You must enter email-address, if name is entered and vice-versa for each friend.
Friend #1 -
Friend #2 -
Friend #3 -
Friend #4 -
Friend #5 -
  Your comment on this question
Max Allowed : 5000 Characters Current Count : 0
  Your comment on this answer
Max Allowed : 5000 Characters Current Count : 0