Database in Suspect mode with error in recovery phase

  • Hi, I am facing the issue on one of my database which is in suspect mode and in the error log following error is captured

    "Could not redo log record (6273:252:2), for transaction ID (0:1992992), on page (1:9), database 'xxxx' (database ID 10). Page: LSN = (6273:238:1), type = 13. Log: OpCode = 4, context 20, PrevPageLSN: (6273:250:1). Restore from a backup of the database, or repair the database."

    I followed these steps:

    1. Brought the DB on emergency state

    2. Single_user mode

    3. DBCC CHECKDB('xxxx', REPAIR_REBUILD)

    GO

    but that gives the following error "Msg 7901, Level 16, State 1, Line 1

    The repair statement was not processed. This level of repair is not supported when the database is in emergency mode.

    "

    Please suggest what action need to be done.

    Rohit

  • The only repair level that is supported in emergency mode is repair_allow_data_loss

    I recommend restoring from backup, I highly doubt that is repairable seeing as the error is on the database boot page.

    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
  • GilaMonster (4/3/2012)


    The only repair level that is supported in emergency mode is repair_allow_data_loss

    I recommend restoring from backup, I highly doubt that is repairable seeing as the error is on the database boot page.

    Thanks Gail by restoring backup i think you mean restoring the page

    "RESTORE DATABASE xxxx PAGE = '1:9'

    FROM DISK = 'C:\xxxx.bak'

    WITH NORECOVERY"

    you said you doubt it is repairable you mean "repair_allow_data_loss" will also not work.

    can you please help me to know how you came to know this is a boot page.

    Thanks

    Rohit

  • From Books Online:

    Limitations of Page Restores

    --------------------------------------------------------------------------------

    Only database pages can be restored. Page restore cannot be used to restore the following:

    Transaction log

    Allocation pages: Global Allocation Map (GAM) pages, Shared Global Allocation Map (SGAM) pages, and Page Free Space (PFS) pages. For more information, see Managing Extent Allocations and Free Space.

    Page 0 of all data files (the file boot page)

    Page 1:9 (the database boot page)

    Full-text catalog

    Looks like you need to do a full restore of the database.

  • gupta.rohit (4/3/2012)


    GilaMonster (4/3/2012)


    The only repair level that is supported in emergency mode is repair_allow_data_loss

    I recommend restoring from backup, I highly doubt that is repairable seeing as the error is on the database boot page.

    Thanks Gail by restoring backup i think you mean restoring the page

    "RESTORE DATABASE xxxx PAGE = '1:9'

    FROM DISK = 'C:\xxxx.bak'

    WITH NORECOVERY"

    No, I meant restore the entire backup. Boot pages are not single-page restorable.

    you said you doubt it is repairable you mean "repair_allow_data_loss" will also not work.

    Can't tell from the error whether the problem is with the log record or the page. If it's the page then repair is unlikely to work. You can try, but bear in mind that it can result in data loss. Restoring from backup is usually preferable for suspect databases.

    can you please help me to know how you came to know this is a boot page.

    http://www.sqlskills.com/blogs/paul/post/Search-Engine-QA-20-Boot-pages-and-boot-page-corruption.aspx

    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

Viewing 5 posts - 1 through 4 (of 4 total)

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