Get database out of in recovery mode.

I have a database sql server 2012 Stuck in recovery, i have tryed to do the restore with recovery, didn't work how can i get rid of this database and get it out of  (in recovery)? without restarting the sql services.  This is on a cluster active/passive configuration.
TylerSR. Data Systems AdministratorAsked:
Who is Participating?
 
Mark WillsConnect With a Mentor Topic AdvisorCommented:
Yep, being patient is not only a virtue, but rewarding in the long run.... Pleased to hear it is resolved :)

Cheers,
Mark
0
 
arnoldCommented:
Error logs, in a cluster the storage shifts so there is no possibility that a db can be in recovery.

Are you restoring the database from backup, the with recovery option allows the restore of transaction logs to get the in time ......

Please clarify your situation.

Usually in this mode, you would have to use alter database to bring it online.

Make sure to check the situation on what happened.
0
 
Mark WillsTopic AdvisorCommented:
Have you tried :
restore database [yourdb] with recovery

Open in new window


Otherwise it is going to get tricky and most likely need to stop and start SQL Server - even for just a brief moment.

That would be to release a lock on the mdb file so you can copy / rename etc...

But start with the restore with recovery - note it is not actually restoring a backup... If that works, great ! otherwise, prepare to stop and restart SQL Server (and more instructions)
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
Scott PletcherSenior DBACommented:
If you want to get rid of the database, just drop it:

DROP DATABASE db_name;
0
 
Mark WillsTopic AdvisorCommented:
good point ... just re-read the question and saw "get rid of this database"

but also read that it is part of Active-Passive cluster, and while that may well be predominantly hardware HA/failover, there could well be DB implications as well. So if there is anything like mirroring (or log shipping etc) then the drop database might not work and need to first release the 'partner'.

ALTER DATABASE [yourdb] SET PARTNER OFF

which you could run anyway.... If not mirrored it will throw an error.

Then you can drop the DB and set about restoring if indeed it is needed.

If you have tried restore with recovery - did you get any error messages ?

Any insights on what happened prior to the 'stuck in recovery mode' ?

Do you use any DB / HA services ?
0
 
TylerSR. Data Systems AdministratorAuthor Commented:
I tryed all the above, the restore with recovery is what i tryed id did not work as the db was locked by another user or process.

It turned out that the process just needed to run for an additional 6 hours and at the end of this time the database came back on line.
0
 
Mark WillsTopic AdvisorCommented:
Is there anything else we can do for you ?

You can choose your own answer as 'best solution' and award any (if any) assisted solutions...

Cheers,
Mark
0
 
TylerSR. Data Systems AdministratorAuthor Commented:
I need to read marcus arilias meditations.
1
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.