Results 1 to 4 of 4
  1. #1
    Join Date
    May 2004
    Posts
    18

    Unanswered: Corrupt Database

    To make a very long story short, we had a SQL server that experienced problems as a result of bad sectors within one of the drives within a RAID5. Although the drive was replaced the server was never the same and we were forced to perform a migration.

    After the migration we began noticing that the server had corrupt data. This was noticed after our applications began erroring out. We determined the corrupt table using DBCC CHECKTABLE and moved the data from those tables into a new table.

    Our applications are now working without error, but now it seems as though our indexes are broken which would make sense becuase the tables have essentially been renamed. During an attempted DTS, I selected the option to NOT copy over indexes. I am getting the same error within a DTS as I am within the servers event logs.

    Page (3:68379), slot 23 for text, ntext, or image node does not exist.
    or
    [SQL-DMO]Code execution exception: EXCEPTION_ACCESS_VIOLATION

    This is one of the errors that helped determine that the database was corrupt in the beginning. To make it worse, our backups are useless becuase they will not restore. In order for me to use a backup, I have to copy the MDF and LDF from the production server and copy to the test environment server and then attach it. From the test server is where I was able to succesfully backup and restore.

    I would have contacted MSFT a long time ago when this all got started. Unfortunately, I work for a company that will not spend the money on asking MSFT for help. I fear that the long this goes on, the worse it gets.

    Please keep in mind that their is a lot of detail that is too must to detail here.

    My question is, what would be the best way to essentially start over without losing the data? I assume that since a DTS is failing I am basically "SOL".

    Does anyone have any suggestions?

    Thank you all for your replies.

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    What is the current result of DBCC CheckTable oon this table?

  3. #3
    Join Date
    May 2004
    Posts
    18
    Below is just a couple of rows from the DBCC CHECKTABLE agains only one of the tables that was previously identified as being corrupt.

    This table, as mentioned before, had its data migrated to a new table becuase of its corrupt status. From the corrupt table we were not able to extract 7 rows of information. Any attempt to read any row within those 7 would result in the server crashing requiring a reboot.

    The only way we were able to see the information within those 7 rows was by doing a SELECT * FROM table query. Those records were not manually copied over since they contained TEXT columns. Becuase of the minimal amount of data loss, it was determined that those rows could be left behind without too much impact since it would be a rare occasion that those records would ever be referenced.

    Thank you for your help.


    Server: Msg 8928, Level 16, State 1, Line 1
    Object ID 1373300002, index ID 0: Page (1:153251) could not be processed. See other errors for details.
    Server: Msg 8928, Level 16, State 1, Line 1
    Object ID 1373300002, index ID 0: Page (1:202978) could not be processed. See other errors for details.
    Server: Msg 8928, Level 16, State 1, Line 1
    Object ID 1373300002, index ID 0: Page (1:283566) could not be processed. See other errors for details.
    Server: Msg 8944, Level 16, State 1, Line 1
    Table error: Object ID 1373300002, index ID 0, page (1:283566), row 6. Test (columnOffsets->offTbl [varColumnNumber] <= (nextRec - pRec)) failed. Values are 6268 and 772.
    Server: Msg 8964, Level 16, State 1, Line 1
    Table error: Object ID 1373300002. The text, ntext, or image node at page (1:174308), slot 33, text ID 3062071558144 is not referenced.
    Server: Msg 8964, Level 16, State 1, Line 1
    Table error: Object ID 1373300002. The text, ntext, or image node at page (1:174308), slot 34, text ID 3062071623680 is not referenced.
    Server: Msg 8964, Level 16, State 1, Line 1

  4. #4
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Do dbcc traceon(3604,-1), and then examine the page with dbcc page(...). You may be able to just update the corrupted LOB records with NULL or data you know should be there.
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •