Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LocalDB: How do you delete it?

Setup: Entity framework code first to new database.

Scenario: I'm playing around with EF and I add a bunch of elements to my database. I then change the entity model, and while I know that I could do migrations, I just want to start from scratch and basically wipe the database from the earth.

The database used by default was (localdb)\v11.0.

My question is:

Can I go somewhere and just delete a file, or start some kind of manager to delete that database and start from scratch?

like image 336
Gabriel G. Roy Avatar asked Mar 10 '13 04:03

Gabriel G. Roy


People also ask

How do I uninstall LocalDB?

Open the command line Run the following commands to stop and remove the local database instance: "C:\Program Files\Microsoft SQL Server\140\Tools\Binn\sqllocaldb" stop blueprismlocaldb. "C:\Program Files\Microsoft SQL Server\140\Tools\Binn\sqllocaldb" delete blueprismlocaldb.

Can I uninstall SQL 2016 LocalDB?

You can uninstall Microsoft SQL Server 2016 LocalDB from your computer by using the Add/Remove Program feature in the Window's Control Panel.

How do I stop LocalDB service?

Be aware that LocalDB has the same limitations as SQL Server Express. Finally, you can stop the instance through the stop command: C:\Program Files\Microsoft SQL Server\120\Tools\Binn>SqlLocalDB.exe stop tugberk LocalDB instance "tugberk" stopped.

Where is LocalDB stored?

The system database files for the database are stored in the local AppData path, which is normally hidden. For example, C:\Users\<user>\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\LocalDBApp1\ .


1 Answers

Just go in command prompt with admin rights and type:

//list the instancies sqllocaldb i  //stop selected instance sqllocaldb p "selected instance"  //delete sqllocaldb d "selected instance"  //recreate or create new one  sqllocaldb c "new instance" 
like image 171
Filip Gjorgjevikj Avatar answered Oct 29 '22 00:10

Filip Gjorgjevikj