SOS DB In-Recovery

  • I am running SQL Server 2012 on Win 7 machine.

    Yesterday, due to extended power failure and other issues, the machine froze.

    Now, when I rebooted the machine, the database is In-Recovery mode.

    Please help. What do I do?

  • The database state (from sys.databases) is RECOVERING?

    If so, wait. There's nothing that you can do to magically bring it out of recovering, the recovery process must complete.

    The progress of the recovery process will be recorded in the error log.

    Do NOT restart SQL, it will start the recovery process over from scratch.

    Do NOT try to drop the database or do anything to the database files, at best it'll do nothing at worst it'll leave you needing to restore from backups

    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
  • Thanks GilaMonster, but I would rather restore from backup. I have a backup just before the disaster.

  • Then drop it and restore, if you're certain it'll be faster and you have all the necessary backups to restore with no data loss.

    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
  • Thanks, but that's the problem. It does not let me take it offline, detach or drop. It is just stuck with SSMS saying <db Name>(In-Recovery).

  • If you're absolutely certain that you can restore from backups, stop the instance, delete the files, start SQL Server, restore from backup.

    Make sure you can restore first!

    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
  • i am hoping i can create a new db and restore into that. But this would not even let me create a new db.

    I got a deadline and need to get this working by hook or crook.

  • "it would not let me" doesn't help us. Can you please give specific errors or issues and what commands you've run.

  • The database is in use.

  • tinausa (6/18/2013)


    The database is in use.

    You cannot be connected to the database you're restoring into.

    USE MASTER

    GO

    RESTORE DATABASE ....

    and make sure that you don't have another window connecting to that DB.

    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
  • I stopped the service. that put the DB out of recovery in a few minutes. Then I restored the DB. The restore happened successfully. Thanks much for your help. Greatly appreciate it.

    I know I lost some work, but some of that needed to be redone anyways.

Viewing 11 posts - 1 through 10 (of 10 total)

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