Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
12 years, 3 months ago
I have a development database which has entered recovery mode on restart, and has been recovering for the last hour or so.
I need to either stop the recovery, or kill it in some way.
I don't care one bit about the database or any of the data, I have deployment scripts.
31.3k 9 9 gold badges 80 80 silver badges 107 107 bronze badges
Dec 17, 2010 at 15:12
Stop SQL Server
Delete MDF + LDF
Start SQL Server
Restore (may need to drop first, comes up suspect)
If the MDF and LDF are present on service start up, it will go into rollforward/rollback recovery. You have to drop them to prevent this.
Dec 17, 2010 at 15:17
69.4k 8 8 gold badges 160 160 silver badges 240 240 bronze badges
Right click on the database in SQL Server Management Studio, and hit Detach.
Select the Drop Connections checkbox only, and hit ok.
Then the database will disappear.
Right click on the Databases folder, and click Attach...
Click Add and find the .mdf file for the database you deleted. You will have to find it in the file system.
Click Ok, and it will be back online.
Nov 29, 2012 at 23:48
Highly active question
. Earn 10 reputation (not counting the
) in order to answer this question. The reputation requirement helps protect this question from spam and non-answer activity.
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only