June 18, 2013 at 8:58 am
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?
June 18, 2013 at 9:20 am
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
June 18, 2013 at 9:39 am
Thanks GilaMonster, but I would rather restore from backup. I have a backup just before the disaster.
June 18, 2013 at 10:00 am
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
June 18, 2013 at 10:09 am
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).
June 18, 2013 at 10:13 am
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
June 18, 2013 at 10:21 am
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.
June 18, 2013 at 10:23 am
"it would not let me" doesn't help us. Can you please give specific errors or issues and what commands you've run.
June 18, 2013 at 10:40 am
The database is in use.
June 18, 2013 at 10:44 am
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
June 18, 2013 at 11:23 am
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