/
Create a clean LocalDB Installation

Create a clean LocalDB Installation



Sometimes you may need to clean out your LocalDB installation. For example, perhaps you need to delete all databases and create new ones. When you do not have access to SQL Server tools such as Microsoft SQL Server Management Studio,there is a command line tool that can be used instead.



Warning!

This procedure will delete all databases that are part of a LocalDB installation.

Step-by-step guide

If you are experiencing problems connecting to your LocalDB installation, creating a demo database on your LocalDB installation, or if you just wish to start fresh, follow the guide below:



  1. Open a command prompt as administrator


  2. List the LocalDB instances using the command:

    sqllocaldb i



  3. By default, LocalDB is created by Jiwa with an instance called "MSSQLLocalDB". Stop the selected instance:

    sqllocaldb p MSSQLLocalDB



  4. Delete the selected instance:

    sqllocaldb d MSSQLLocalDB



  5. Recreate the selected instance:

    sqllocaldb c MSSQLLocalDB



  6. Start the newly created instance:

    sqllocaldb s MSSQLLocalDB



 You should now be able to use the Jiwa Database Manager to create a new demonstration database on LocalDB. See here for more information.



Tip

The system database files for the database are stored in the users' local AppData path which is normally hidden. For example C:\Users\--user--\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\MSSQLLocalDB. Sometimes it is necessary to go to this folder using Windows Explorer and delete .mdf and .ldf files for databases you no longer want.



Related articles







Related content

Managing Databases
Managing Databases
More like this
Managing Connections
Managing Connections
More like this
Installation of Jiwa 7 for demonstration purposes and client review
Installation of Jiwa 7 for demonstration purposes and client review
More like this
Creating a 7.00.175 to 7.02.01 databases under SQL2017 and higher errors 'Could not import package...'
Creating a 7.00.175 to 7.02.01 databases under SQL2017 and higher errors 'Could not import package...'
More like this
Unable to create a Demo database on SQL 2016
Unable to create a Demo database on SQL 2016
More like this
Jiwa 7 Installation Guide
Jiwa 7 Installation Guide
More like this