SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Database Stuck in Recovery Mode..


Database Stuck in Recovery Mode..

Author
Message
Dave Rooke
Dave Rooke
SSC Journeyman
SSC Journeyman (92 reputation)SSC Journeyman (92 reputation)SSC Journeyman (92 reputation)SSC Journeyman (92 reputation)SSC Journeyman (92 reputation)SSC Journeyman (92 reputation)SSC Journeyman (92 reputation)SSC Journeyman (92 reputation)

Group: General Forum Members
Points: 92 Visits: 18

i have a database which seems to be stuck in recovery mode.

I have tried to detach it but cant, i have also tried stopping the service in order to delete but it goes through the process of trying to stop the service and eventually just hangs..

anyone any ideas how to resolve this problem...?

many thanks in advance.....


Gift Peddie
Gift Peddie
SSCertifiable
SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)

Group: General Forum Members
Points: 6218 Visits: 14456

You run into this pesky problem when you restore a database with no recovery option per Microsoft that is not valid so SQL Server keeps your database in recovery until you restore with recovery. Solution delete your restore and restore with recovery. Hope this helps.



Kind regards,
Gift Peddie
Andras Belokosztolszki
Andras Belokosztolszki
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2247 Visits: 1585
You could also execute restore with no backup files, to finish the recovery process (this saves the delete).

RESTORE DATABASE mydatabase WITH RECOVERY

Andras



Andras Belokosztolszki, MCPD, PhD
GoldenGate Software
Gift Peddie
Gift Peddie
SSCertifiable
SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)

Group: General Forum Members
Points: 6218 Visits: 14456

That is correct but the time I answered this post it was not the advice I will give based on duration in recovery. Delete starts a clean restore with recovery skipping the database getting to in recovery mode in the first place.



Kind regards,
Gift Peddie
Dave Rooke
Dave Rooke
SSC Journeyman
SSC Journeyman (92 reputation)SSC Journeyman (92 reputation)SSC Journeyman (92 reputation)SSC Journeyman (92 reputation)SSC Journeyman (92 reputation)SSC Journeyman (92 reputation)SSC Journeyman (92 reputation)SSC Journeyman (92 reputation)

Group: General Forum Members
Points: 92 Visits: 18

Hi

sorry for the delay in getting back, but been away on business...

thanks for the pointers, but nothing works?

when i run these scripts i get the error that the database is in use.

this database was a sql 2005 database that i was updating from another server.

any further ideas of how i get round this?

thanks in advance....


Dave Rooke
Dave Rooke
SSC Journeyman
SSC Journeyman (92 reputation)SSC Journeyman (92 reputation)SSC Journeyman (92 reputation)SSC Journeyman (92 reputation)SSC Journeyman (92 reputation)SSC Journeyman (92 reputation)SSC Journeyman (92 reputation)SSC Journeyman (92 reputation)

Group: General Forum Members
Points: 92 Visits: 18

go it sorted.

eventually i was able to stop the sql service and delete the database.

thanks again for your help - much appreciated....


azigy
azigy
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 4
how do you stop the service though?
Gift Peddie
Gift Peddie
SSCertifiable
SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)

Group: General Forum Members
Points: 6218 Visits: 14456
The SQL Server service is in the configuration manager under services right click it and click stop.

Kind regards,
Gift Peddie
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search