- 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.
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
- Go to File | New | Data Source and select Microsoft SQL Server.
- 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.
- Choose the Connection type (default or URL only).
- Enter the Host and Port (1433 by default), or pick a named instance from the Instance list. If a server name such as
DESKTOPdoes not resolve, JetBrains suggests using the IP address. - Choose the Authentication method (see below) and enter credentials if needed.
- Enter a Database if you want a default database.
- Click Test Connection, then OK. Select the data source and press F4 to open a query console.
jdbc:sqlserver://<host_address>\<instance_name>:<port_number>;database=<database_name>
jdbc:sqlserver://127.0.0.1\MYINSTANCE:1433;database=myDatabaseChoose an authentication method
| Option | When to use it | Notes from the documentation |
|---|---|---|
| User & Password | SQL 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 Server | Windows only. JetBrains' tutorial selects the jTds driver for this. |
| Domain credentials | A domain account entered as domain, user and password | Used for Windows domain authentication from macOS and Linux. |
| Kerberos | Kerberos-enabled environments | Requires a Kerberos ticket; check it with klist and get one with kinit. |
| No auth | Rarely useful for SQL Server | No 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:
- Login rejected: see error 18456, login failed for user.
- Login works but the default database cannot be opened: see error 4060.
- Server not found or nothing listening: the causes in error 53 and error 10061 (TCP/IP disabled, wrong port or instance, firewall).
- Azure SQL Database refusing your IP address: see error 40615.
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
- DataGrip documentation: Microsoft SQL Server
- DataGrip documentation: SQL Server data sources with Kerberos and in different OSs
- DataGrip documentation: Configure SSH and SSL
- DataGrip documentation: Cannot connect to a database
- JetBrains: What's New in DataGrip 2026.2
- Microsoft Learn: Enable or disable a server network protocol
Checked 8 October 2026.
How we research tool guides: our editorial method. CodeWithSQL earns nothing from the vendors mentioned.