DataGrip 2019.1 Help

How to connect to SQL Server Express LocalDB

You can easily connect to your LocalDB instance with DataGrip. And as a first step, check if your LocalDB instance is ready for a connection. Locate SqllocalDB.exe and run the SqllocalDB.exe i command in a terminal. You will see a list of available LocalDB instances on the server. You can connect to any of them.

Run the SqllocalDB.exe i command

Say, we want to connect to the v11.0 instance. First, we need to check its state by running SqllocalDB.exe i v11.0 command.

Run SqllocalDB.exe i v11.0 command

Currently, the instance is stopped (see the State field). Let's start the instance by running SqllocalDB.exe s v11.0 in the terminal.

Run SqllocalDB.exe s v11.0

The instance is ready, you can launch DataGrip.

Open the Database view by pressing Alt+2 and click the Add icon (The Add button) to add a new datasource, then select SQL Server (jTds).

Add SQL Server (jTds) as a data source

In the connection window, select LocalDB in the dropdown list that is located next to the URL field. Then go to the Instance field and select the instance to connect to, in our case, it is v11.0.

Select the LocalDB instance to which you want to connect to

Open the Advanced tab and find the DOMAIN option and set it to the name of the machine where the instance is installed. If the instance is on your local machine, use the name of your computer.

Set the DOMAIN option

Enter your access credentials and click Test connection.

Enter credentials for the connection
Last modified: 25 July 2019