Cannot open tables in Database

  • Hello,

    I have SQL 2005 SP4 and cannot open the table on a specific database. When I execute:

    DBCC CHECKDB ('WSS_Content') WITH ALL_ERRORMSGS, NO_INFOMSGS

    Following errors where shown:

    Msg 7985, Level 16, State 2, Line 1

    System table pre-checks: Object ID 4. Could not read and latch page (1:128277) with latch type SH. Check statement terminated due to unrepairable error.

    Msg 5233, Level 16, State 98, Line 1

    Table error: alloc unit ID 72057596800466944, page (1:128277). The test (IS_OFF (BUF_IOERR, pBUF->bstat)) failed. The values are 29493257 and -4.

    CHECKDB found 0 allocation errors and 1 consistency errors not associated with any single object.

    CHECKDB found 0 allocation errors and 1 consistency errors in database 'WSS_Content'.

    Anybody an idea?

  • Do you have a recent backup? it looks like it is corrupt database based on this "Check statement terminated due to unrepairable error"

    :cool:

    "There are no problems! Only solutions that have yet to be discovered!"

  • I don't have a backup 🙁

    The first time I wanted to attach the database I had this error:

    SQL Server detected a logical consistency-based I/O error: incorrect checksum (expected: 0xf0360955; actual: 0xa9f56639). It occurred during a read of page (1:1141) in database ID 7 at offset 0x000000008ea000 in file 'G:\WSS_Content.mdf'. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.

    So I went too google and found a solution. Create new database en override.

    In the eventviewer I also see an event when I try to reach my site (SharePoint):

    Attempt to fetch logical page (1:1568) in database 7 failed. It belongs to allocation unit 72057596816588800 not to 983040.

  • So you already have fixed the isssue? Please post results of what you did for anyone else looking.

    :cool:

    "There are no problems! Only solutions that have yet to be discovered!"

  • No I don't have a solution. I'm still having the above issues.

  • Restore from backup or recreate the database from scratch, there's no other solution for this. The system tables are corrupt, this database is not repairable.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Have you tryed seeing if there is a repair or recreate through SharePoint? Because I know this is a typical name of SharePoint.

    :cool:

    "There are no problems! Only solutions that have yet to be discovered!"

  • There won't be a repair (this is irreparable). The content DB might be re-creatable, but that would mean losing all the contents of the sharepoint site (but there may be no getting around that by this point)

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • And a Data Recovery Company? Maybe they could help me.

  • I wouldn't bet on it.

    Data recovery companies get data off a damaged/unreadable drive (and they charge a fortune). The drive here is readable, but the SQL database is toast, hence if the data recovery company gets data off, all they'll have will be a damaged SQL database.

    You can try extracting what data you can (select from tables) and reload into a new database, but this is sharepoint where the structure of the site is stored as data in the database. Anything that's missed could result in a useless site, and I'm fairly sure that messing with the data like that voids all support agreements, so MS won't help you in any way.

    You really have absolutely no backups, sharepoint or SQL? That's a really stupid situation. I can only assume that the data in that sharepoint site isn't too important seeing as no one bothered to back it up.

    If so, my gut feel is that you need to drop the site from sharepoint and recreate from scratch, reload any documents, etc.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • This was removed by the editor as SPAM

  • I am a bit out of my element here, but I did not see anything directly of what is on the bad page. Is the table corrupt or is the entire database bad as a result? Is the page with corruption on an index that could be dropped to remove the bad data?

    Just curiosity here.

  • The damage is to one of the critical system tables. Specifically table 4 (I think that was sysrowsetcols ion SQL 2005)

    Msg 7985, Level 16, State 2, Line 1

    System table pre-checks: Object ID 4. Could not read and latch page (1:128277) with latch type SH. Check statement terminated due to unrepairable error.

    There is nothing that can be done to repair this, the critical system tables tell SQL where the user tables start and what their structure is (among other things). Without those tables, there's no way for CheckDB to even tell what the DB structure is, much less fix errors.

    If the damage was in a nonclustered index the minimum repair level would have been REPAIR_REBUILD and the damage would have been completely repairable using CheckDB with the REPAIR_REBUILD option or by dropping and recreating the nonclustered index. The lack of a minimum level to repair means that the damage is not repairable.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • We have analysed the .mdf file by a Recovery Company. The result was that some tables are corrupt and doesn't have the right reference numbers or something.

  • This was removed by the editor as SPAM

Viewing 15 posts - 1 through 15 (of 22 total)

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