repair index

  • Hi - I need to repair index in 6.5 version

    please provide me DBCC command

    Thanks

  • in SQL 6.5 you would use the command DBCC CHECKDB

    MVDBA

  • What,exactly, are you trying to repair? Did DBCC return an error on an index? If so, could you please post the error returned. That will help the folks here to know what sort of process you need to use to get the index fixed.


    And then again, I might be wrong ...
    David Webb

  • One of the table is corrupt and I could not find SQL 6.5 command to fix it.

    Not sure if an index or data issue

    Error messages

    Msg 624, Level 20, State 1

    Attempt to retrieve row from page via RID failed because the requested RID has a higher number than the last RID on the page. Rid pageid is 0x6 and row num is 0xffffed7c.Page pointer = 0x24c19000, pageno = 2814043, status = 0x101, objectid = 1968010042, indexid = 0.

    The SQL Server is terminating this process.

    DBCC CHECKTABLE(TABLE1)

    Checking TABLE1

    The total number of data pages in this table is 6231.

    Table has 33443 data rows.

    Msg 625, Level 20, State 1

    Could not retrieve row from logical page 2814038 via RID because the entry in the offset table (= 0) for that RID (= 6) is less than or equal to 0.

    DBCC execution completed. If DBCC printed error messages, see your System Administrator.

  • I'm not sure this is fixable. Do you have a good backup? Can you BCP the data out (I'm guessing not)?


    And then again, I might be wrong ...
    David Webb

  • I think I would immediately copy all the data out of that table that I could get. Otherwise you could easily lose it all.

    Also do you have a good backup?

    If it is just an index corrupted then rebuild it, AFTER you copy the data out..

    CEWII

  • If I recall correctly, index 0 is the heap in a table with no clustered index. So it looks like the data pages are messed up. Still, getting the data out and rebuilding the table are the best options at this point. If that doesn't work, restoring from a backup or restoring the database to another name and copying out that table into the current DB would be the next step.


    And then again, I might be wrong ...
    David Webb

  • I'm with David on this..

    I'd also be curious what caused the corruption in the first place..

    As a further question, why are you still using SQL 6.5?

    CEWII

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply