my database now says "in recovery"

  • All of a sudden I couldn't open up one of my tables through the management studio, (timeout error) so I shut down SQL server and rebooted the machine, now after rebooting the database says "in recovery"

    Is there anything I can do to get my data back?

  • Can you run this :

    RESTORE DATABASES 'databasename' WITH RECOVERY, which will put it in recovery. Is this your production ?

    and can you run DBCC CHECKDB please?

    Is there anything in the Error log? Can you post it here please?

  • Wait.

    Unless there's a bigger problem, SQL's busy recovering your database. If you check the log you should see entries like this.

    Recovery of database MyDB is 42% complete (phase 2 of 3). Estimated time remaining 137 seconds

    If you look in the error log and don't see those, but do see nasty looking errors that refer to OS errors or the like, post them here ans we'll offer suggestions. If it is just a normal recovery, wait until it's finished and the DB will be back, available and fine.

    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
  • Yes, thank you, I checked the logs and it gave times and actions about recovering, it is restored now, phew!!!

  • It's because the shutdown was unexpected and sudden. SQL didn't have time (or warning) to cleanly shut the databases down (rollback uncommitted transactions, write dirty pages to disk) before terminating, so it had to do it after startup, before making the databases usable.

    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
  • OK, Thanks Gail

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

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