1

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 (asp.data 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?

1 Answer 1

2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.