Skip to content
Guide · DataGrip

How to Connect DataGrip to SQL Server

DataGrip talks to SQL Server over TCP/IP through a JDBC driver, so the server side matters as much as the dialog. This guide covers what JetBrains documents for DataGrip 2026.2: preparing SQL Server, creating the data source, choosing an authentication method and driver, SSL and SSH, and where to look when the connection fails.

Steps and facts checked 8 October 2026 against the vendor's official documentation. Versions covered: DataGrip 2026.2, SQL Server versions 10 to 17 (DataGrip's documented range), Microsoft SQL Server JDBC driver 13.2.1 bundled. Next review due April 2027. Menus, shortcuts and prices change between releases; check the vendor's documentation for your version.
Short answer
  • SQL Server must accept TCP/IP connections. The default port is 1433, which the Windows Firewall blocks by default.
  • Create the connection with File | New | Data Source | Microsoft SQL Server, then set host, port or instance, authentication and database.
  • DataGrip offers two drivers: Microsoft SQL Server (bundled as version 13.2.1 in DataGrip 2026.2) and jTds, which JetBrains' tutorial uses for Windows single sign-on.
  • DataGrip documents support for SQL Server versions 10 to 17.
How we know: Research-based: the steps and options were checked against the DataGrip documentation for Microsoft SQL Server, the SSH and SSL page, the DataGrip 2026.2 release notes and Microsoft Learn on 8 October 2026. We have not made this connection for the guide; dialog labels are quoted from JetBrains' documentation.

Prepare SQL Server for a DataGrip connection

A DataGrip SQL Server connection uses TCP/IP. JetBrains' documentation points out three server-side requirements that SSMS users on the same machine often never meet:

  • TCP/IP must be enabled. Microsoft documents this in SQL Server Configuration Manager under SQL Server Network Configuration. Restart the SQL Server service after changing it.
  • The port must be open. The default instance (MSSQLSERVER) listens on 1433, and the Windows Firewall closes that port by default.
  • Named instances need the instance name or port. If the SQL Server Browser service is running, DataGrip can connect by instance name; otherwise use the instance's TCP port.

DataGrip documents support for SQL Server versions 10 to 17. Azure SQL Database also uses port 1433.

Create the SQL Server data source

  1. Go to File | New | Data Source and select Microsoft SQL Server.
  2. On the General tab, choose the driver. The supported drivers are Microsoft SQL Server and Microsoft SQL Server (jTds). DataGrip 2026.2 bundles the Microsoft driver.
  3. Choose the Connection type (default or URL only).
  4. Enter the Host and Port (1433 by default), or pick a named instance from the Instance list. If a server name such as DESKTOP does not resolve, JetBrains suggests using the IP address.
  5. Choose the Authentication method (see below) and enter credentials if needed.
  6. Enter a Database if you want a default database.
  7. Click Test Connection, then OK. Select the data source and press F4 to open a query console.
SQL Server JDBC URL format and example from the DataGrip documentation
jdbc:sqlserver://<host_address>\<instance_name>:<port_number>;database=<database_name>
jdbc:sqlserver://127.0.0.1\MYINSTANCE:1433;database=myDatabase

Choose an authentication method

Authentication options documented for SQL Server data sources
OptionWhen to use itNotes from the documentation
User & PasswordSQL Server logins (SQL authentication)JetBrains documents it for Windows, macOS and Linux.
Windows credentials (single sign-on)DataGrip on Windows in the same domain as SQL ServerWindows only. JetBrains' tutorial selects the jTds driver for this.
Domain credentialsA domain account entered as domain, user and passwordUsed for Windows domain authentication from macOS and Linux.
KerberosKerberos-enabled environmentsRequires a Kerberos ticket; check it with klist and get one with kinit.
No authRarely useful for SQL ServerNo credentials are sent.

SSL and SSH tunnel settings

On the SSH/SSL tab, select Use SSL to configure certificates: a CA file (JetBrains' own example is mssql.pem) or a truststore, optional client certificate and key, and a Mode of Require, Verify CA or Full Verification. Full Verification also checks that the host name matches the server certificate, so use the host name that appears in the certificate.

To reach a server on a private network, select Use SSH tunnel, add an SSH configuration (host, port, user name and authentication type) and test it. The database host on the General tab is then resolved on the SSH server.

When the SQL Server connection fails

Start with DataGrip's checklist: confirm the host answers ping, test the port with telnet <host> 1433, check the driver version, and on Windows make sure the temp directory path has only ASCII characters. JetBrains also lists port 1434 (UDP), used by the SQL Server Browser, as possibly required.

The underlying SQL Server problems are the same ones SSMS users see, although the JDBC driver words the messages differently:

Frequently asked questions

What port does DataGrip use for SQL Server?

1433 by default. Named instances may use another port; pick the instance from the Instance list or enter its port.

Can DataGrip use Windows authentication for SQL Server?

Yes. On Windows in the same domain, JetBrains' tutorial uses the jTds driver with Windows credentials. From macOS or Linux, use Domain credentials or Kerberos.

Which SQL Server driver should I choose in DataGrip?

The Microsoft SQL Server driver is the default and is bundled in DataGrip 2026.2. JetBrains' tutorials use jTds for Windows single sign-on and domain authentication.

Why can SSMS connect when DataGrip cannot?

A working SSMS session on the server itself does not prove that remote TCP/IP connections work. DataGrip's documentation requires TCP/IP to be enabled and the port to be open in the firewall, so check both in SQL Server Configuration Manager and the Windows Firewall.

Does DataGrip work with Azure SQL Database?

Yes, through the same Microsoft SQL Server data source; DataGrip lists port 1433 for Azure SQL Database. If Azure refuses your client IP address, see error 40615.

Sources

Checked 8 October 2026.

How we research tool guides: our editorial method. CodeWithSQL earns nothing from the vendors mentioned.

Still choosing a SQL client?

Read the full reviews, or compare tools side by side.