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. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm doing a project in Visual Studio 2012 and it involves working with the given database. As I add the database.mdf to the project ( folder) I got a connection error, but nothing out of the ordinary. To "repair" the database we are supposed to enter this into cmd

cd "C:\Program Files\Microsoft SQL Server\110\Tools\Binn"
SqlLocalDB.exe delete v11.0

At school everything worked fine, but at home I got this error in cmd

Delete of LocalDB instance "v11.0" failed because of the following error:
Requested operation on LocalDB instance cannot be performed because specified instance is currently in use. Stop the instance and try again.

What do I have to close/do?

share|improve this question

migrated from Nov 28 '13 at 4:12

This question came from our site for professional and enthusiast programmers.

up vote 2 down vote accepted

You simply need to make sure you have stopped the database before deleting it.

You can check the current state by running this:

SqlLocalDb info "MyInstance"

and stop it by running :

SqlLocalDb stop   "MyInstance"

Once stopped you should be able to delete the instance.

This is a nice guide on installing and deleting express databases.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.