Create Microsoft SQL Server data sources with Kerberos and in different OSs
For full information about Microsoft SQL Server, refer to the official documentation.
To download Microsoft SQL Server database software, refer to the official software downloads.
This topic gives you examples of how you can create a data source for Microsoft SQL Server from WebStorm. It describes the configuration of WebStorm on Windows, macOS, and Linux.
Note that the Use Windows domain authentication checkbox is available only on Windows. To configure Windows domain authentication on macOS and Linux, refer to Connect by using Windows domain authentication.
Microsoft SQL Server accepts TCP/IP connections on a dedicated port. By default, it is port 1433
and it is closed by the Microsoft Windows Firewall. When connecting via port, make sure that the Firewall does not close the port that you use.
If the SQL Server Browser is turned on, TCP/IP connection can also be established using the Microsoft SQL Server instance name.
Follow the official instructions to enable the protocol, check and assign a port number. Verify that other running applications do not use the same port.
Name of the Microsoft SQL Server instance is MSSQLSERVER. By default, the port is
1433
.
note
If you changed any settings, restart the server. For most situations, the restart resolves connection problems.
Before establishing connection to a Microsoft SQL Server database with Kerberos authentication, make sure you have the authentication ticket.
If there is a ticket cache file on your machine and
useTicketCache
is set totrue
, runklist
command. Make sure it lists your ticket among the cached ones.If ticket cache is not enabled on your machine, do the following:
Run
klist
command and make sure it lists your ticket.If your authentication ticket is not on the list, run the
kinit
command with your username to obtain the ticket from server:kinit sqlsrvkrb
. Instead ofsqlsrvkrb
, use your username. When prompted, enter your password.
To connect to the database, create a data source that will store your connection details. You can do this using one of the following ways:
In the main menu, go to File | New | Data Source and select Microsoft SQL Server.
In the Database tool window (View | Tool Windows | Database) , click the New icon (
) in the toolbar. Navigate to Data Source and select Microsoft SQL Server.
Click the Driver link and select the driver for your connection.
Check if there is a Download missing driver files link at the bottom of the connection settings area. Click this link to download drivers that are required to interact with a database. For a direct download link, refer to the JetBrains JDBC drivers page.
Location for the downloaded JDBC drivers is the WebStorm configuration directory.
You can also use your drivers for the database instead of the provided ones. For more information about connecting to a database with your driver, refer to Add a user driver to an existing connection.
If there is no Download missing driver files link, then you already have the required drivers.
Specify the database connection details. Alternatively, paste the JDBC URL in the URL field.
In Host, Instance, and Port fields, specify your connection details.
From the Authentication list, select Kerberos.
In the User and Password fields, type your user credentials.
To use no password, leave the Password field empty.
To delete a once entered password, right-click the Password field and select Set Empty.
In the Database field, type the database name to which you want to connect.
Ensure that the database connection can be established using the provided details. To do this, click the Test Connection link at the bottom of the connection details section.
If you encounter any connection issues, refer to the Cannot connect to a database page.
(Optional) By default, only the default database and schema are introspected and available to work with. If you also want to work with other databases and schemas, in the Schemas tab, select them for the introspection.
Click OK to create the data source.
Find your new data source in the Database tool window.
For more information about the Database tool window, see the corresponding reference topic.
tip
To see more databases and schemas under your new data source node, click the N of M button and select the ones you need. WebStorm will introspect and show them.
For more information about working with database objects in WebStorm, refer to Database objects.
To write and run queries, open the default query console by clicking the data source and pressing .
To view and edit data of a database object, open Data editor and viewer by double-clicking the object.

In the Database tool window (View | Tool Windows | Database), click the Data Source Properties icon
. Alternatively, press .
In the Data Sources and Drivers dialog, click the Add icon (
) and select Microsoft SQL Server.
Click the Driver link and select Microsoft SQL Server (jTds).
Check if there is a Download missing driver files link at the bottom of the connection settings area. Click this link to download drivers that are required to interact with a database. For a direct download link, refer to the JetBrains JDBC drivers page.
Location for the downloaded JDBC drivers is the WebStorm configuration directory.
You can also use your drivers for the database instead of the provided ones. For more information about connecting to a database with your driver, refer to Add a user driver to an existing connection.
If there is no Download missing driver files link, then you already have the required drivers.
In Host, Instance, and Port fields, specify your connection details. If the server name (for example,
DESKTOP
) does not work, replace it with the server IP address.From the Authentication list, select User & Password.
In User and Password fields, specify your credentials.
Ensure that the database connection can be established using the provided details. To do this, click the Test Connection link at the bottom of the connection details section.
If you encounter any connection issues, refer to the Cannot connect to a database page.
(Optional) By default, only the default database and schema are introspected and available to work with. If you also want to work with other databases and schemas, in the Schemas tab, select them for the introspection.
Click OK to create the data source.
Find your new data source in the Database tool window.
For more information about the Database tool window, see the corresponding reference topic.
tip
To see more databases and schemas under your new data source node, click the N of M button and select the ones you need. WebStorm will introspect and show them.
For more information about working with database objects in WebStorm, refer to Database objects.
To write and run queries, open the default query console by clicking the data source and pressing .
To view and edit data of a database object, open Data editor and viewer by double-clicking the object.

If you run WebStorm on Windows in the same domain as the Microsoft SQL Server database, you can use the Single-Sign On (SSO).
In the Database tool window (View | Tool Windows | Database), click the Data Source Properties icon
. Alternatively, press .
In the Data Sources and Drivers dialog, click the Add icon (
) and select Microsoft SQL Server.
Click the Driver link and select Microsoft SQL Server (jTds).
Check if there is a Download missing driver files link at the bottom of the connection settings area. Click this link to download drivers that are required to interact with a database. For a direct download link, refer to the JetBrains JDBC drivers page.
Location for the downloaded JDBC drivers is the WebStorm configuration directory.
You can also use your drivers for the database instead of the provided ones. For more information about connecting to a database with your driver, refer to Add a user driver to an existing connection.
If there is no Download missing driver files link, then you already have the required drivers.
In Host, Instance, and Port fields, specify your connection details. If the server name (for example,
DESKTOP
) does not work, replace it with the server IP address.From the Authentication list, select Windows credentials.
Ensure that the database connection can be established using the provided details. To do this, click the Test Connection link at the bottom of the connection details section.
If you encounter any connection issues, refer to the Cannot connect to a database page.
(Optional) By default, only the default database and schema are introspected and available to work with. If you also want to work with other databases and schemas, in the Schemas tab, select them for the introspection.
Click OK to create the data source.
Find your new data source in the Database tool window.
For more information about the Database tool window, see the corresponding reference topic.
tip
To see more databases and schemas under your new data source node, click the N of M button and select the ones you need. WebStorm will introspect and show them.
For more information about working with database objects in WebStorm, refer to Database objects.
To write and run queries, open the default query console by clicking the data source and pressing .
To view and edit data of a database object, open Data editor and viewer by double-clicking the object.

In the Database tool window (View | Tool Windows | Database), click the Data Source Properties icon
. Alternatively, press .
In the Data Sources and Drivers dialog, click the Add icon (
) and select Microsoft SQL Server.
Click the Driver link and select Microsoft SQL Server (jTds).
Check if there is a Download missing driver files link at the bottom of the connection settings area. Click this link to download drivers that are required to interact with a database. For a direct download link, refer to the JetBrains JDBC drivers page.
Location for the downloaded JDBC drivers is the WebStorm configuration directory.
You can also use your drivers for the database instead of the provided ones. For more information about connecting to a database with your driver, refer to Add a user driver to an existing connection.
If there is no Download missing driver files link, then you already have the required drivers.
In Host, Instance, and Port fields, specify your connection details. If the server name (for example,
DESKTOP
) does not work, replace it with the server IP address.From the Authentication list, select Domain credentials.
In the Domain field, specify the domain (for example,
DEVELOPMENT
).In User and Password fields, specify your domain credentials. In the User field, type your domain user without the domain prefix (for example,
John.Smith
instead ofDOMAIN\John.Smith
).Alternatively, on the General tab, specify the connection string. Consider the following example of a full connection string:
jdbc:jtds:sqlserver://DESKTOP:1433;domain=DEVELOPMENT;instance=MSSQLSERVER;databaseName=guest;
Ensure that the database connection can be established using the provided details. To do this, click the Test Connection link at the bottom of the connection details section.
If you encounter any connection issues, refer to the Cannot connect to a database page.
(Optional) By default, only the default database and schema are introspected and available to work with. If you also want to work with other databases and schemas, in the Schemas tab, select them for the introspection.
Click OK to create the data source.
Find your new data source in the Database tool window.
For more information about the Database tool window, see the corresponding reference topic.
tip
To see more databases and schemas under your new data source node, click the N of M button and select the ones you need. WebStorm will introspect and show them.
For more information about working with database objects in WebStorm, refer to Database objects.
To write and run queries, open the default query console by clicking the data source and pressing .
To view and edit data of a database object, open Data editor and viewer by double-clicking the object.

In the Database tool window (View | Tool Windows | Database), click the Data Source Properties icon
. Alternatively, press .
In the Data Sources and Drivers dialog, click the Add icon (
) and select Microsoft SQL Server.
Click the Driver link and select Microsoft SQL Server (jTds).
Check if there is a Download missing driver files link at the bottom of the connection settings area. Click this link to download drivers that are required to interact with a database. For a direct download link, refer to the JetBrains JDBC drivers page.
Location for the downloaded JDBC drivers is the WebStorm configuration directory.
You can also use your drivers for the database instead of the provided ones. For more information about connecting to a database with your driver, refer to Add a user driver to an existing connection.
If there is no Download missing driver files link, then you already have the required drivers.
In Host, Instance, and Port fields, specify your connection details. If the server name (for example,
DESKTOP
) does not work, replace it with the server IP address.From the Authentication list, select User & Password.
In User and Password fields, specify your credentials.
Ensure that the database connection can be established using the provided details. To do this, click the Test Connection link at the bottom of the connection details section.
If you encounter any connection issues, refer to the Cannot connect to a database page.
(Optional) By default, only the default database and schema are project and dataset are database is schema is keyspace is namespace is introspected and available to work with. If you also want to work with other databases and schemas projects and datasets databases, schemas, and shared databases databases schemas keyspaces namespaces, in the Schemas tab, select them for the introspection.
Click OK to create the data source.
Find your new data source in the Database tool window.
For more information about the Database tool window, see the corresponding reference topic.
tip
To see more databases and schemas projects and datasets databases, schemas, and shared databases databases schemas keyspaces namespaces under your new data source node, click the N of M button and select the ones you need. WebStorm will introspect and show them.
For more information about working with database objects in WebStorm, refer to Database objects.
To write and run queries, open the default query console by clicking the data source and pressing .
To view and edit data of a database object, open Data editor and viewer by double-clicking the object.

In the Database tool window (View | Tool Windows | Database), click the Data Source Properties icon
. Alternatively, press .
In the Data Sources and Drivers dialog, click the Add icon (
) and select Microsoft SQL Server.
Click the Driver link and select Microsoft SQL Server (jTds).
Check if there is a Download missing driver files link at the bottom of the connection settings area. Click this link to download drivers that are required to interact with a database. For a direct download link, refer to the JetBrains JDBC drivers page.
Location for the downloaded JDBC drivers is the WebStorm configuration directory.
You can also use your drivers for the database instead of the provided ones. For more information about connecting to a database with your driver, refer to Add a user driver to an existing connection.
If there is no Download missing driver files link, then you already have the required drivers.
In Host, Instance, and Port fields, specify your connection details. If the server name (for example,
DESKTOP
) does not work, replace it with the server IP address.From the Authentication list, select Domain credentials.
In the Domain field, specify the domain (for example,
DEVELOPMENT
).In User and Password fields, specify your domain credentials. In the User field, type your domain user without the domain prefix (for example,
John.Smith
instead ofDOMAIN\John.Smith
).Alternatively, on the General tab, specify the connection string. Consider the following example of a full connection string:
jdbc:jtds:sqlserver://DESKTOP:1433;domain=DEVELOPMENT;instance=MSSQLSERVER;databaseName=guest;
Ensure that the database connection can be established using the provided details. To do this, click the Test Connection link at the bottom of the connection details section.
If you encounter any connection issues, refer to the Cannot connect to a database page.
(Optional) By default, only the default database and schema are project and dataset are database is schema is keyspace is namespace is introspected and available to work with. If you also want to work with other databases and schemas projects and datasets databases, schemas, and shared databases databases schemas keyspaces namespaces, in the Schemas tab, select them for the introspection.
Click OK to create the data source.
Find your new data source in the Database tool window.
For more information about the Database tool window, see the corresponding reference topic.
tip
To see more databases and schemas projects and datasets databases, schemas, and shared databases databases schemas keyspaces namespaces under your new data source node, click the N of M button and select the ones you need. WebStorm will introspect and show them.
For more information about working with database objects in WebStorm, refer to Database objects.
To write and run queries, open the default query console by clicking the data source and pressing .
To view and edit data of a database object, open Data editor and viewer by double-clicking the object.
