Skip to content
Guide · HeidiSQL

How to Connect HeidiSQL to SQL Server

HeidiSQL connects to Microsoft SQL Server through a session with the "Microsoft SQL Server (TCP/IP)" network type. On Windows it uses Microsoft's OLE DB providers; on Linux and macOS it uses FreeTDS, which the project says is not yet fully mature. This guide covers the documented settings, Windows authentication, SSH tunnels, what the SSL tab does not cover, and the SQL Server errors you are most likely to meet.

Steps and facts checked 8 October 2026 against the vendor's official documentation. Versions covered: HeidiSQL 12.21 (Windows build with OLE DB providers; Linux and macOS builds with FreeTDS). Next review due April 2027. Menus, shortcuts and prices change between releases; check the vendor's documentation for your version.
Short answer
  • Create a session with network type "Microsoft SQL Server (TCP/IP)", enter the server name, user (default sa) and password, or tick Use Windows authentication.
  • The port defaults to 0, which lets the driver detect it (previously 1433); set it explicitly if your instance uses a fixed port.
  • On Windows the Library field selects the provider: MSOLEDBSQL by default; the older SQLOLEDB triggers a warning because it uses TLS 1.0.
  • An SSH tunnel is available for the SQL Server TCP/IP type; HeidiSQL's SSL tab is not enabled for SQL Server sessions.
  • On Linux and macOS, SQL Server support runs through FreeTDS and is described by the project as not yet fully mature.
How we know: Research-based: settings, defaults and limitations were checked against the HeidiSQL help page, the Lazarus branch README and the session and connection source code in the official GitHub repository on 8 October 2026. We have not connected to SQL Server with HeidiSQL for this guide.

HeidiSQL SQL Server connection: step by step

  1. Open the Session manager and click New.
  2. Set Network type to Microsoft SQL Server (TCP/IP). Named pipe, SPX/IPX, Banyan VINES and Windows RPC variants also exist for older setups.
  3. On Windows, leave Library on MSOLEDBSQL (the Microsoft OLE DB Driver for SQL Server) unless you have a reason to change it.
  4. Enter Hostname / IP. Leave Port at 0 for auto-detection by the driver, or enter the instance's TCP port.
  5. Either enter User and Password for a SQL Server login (the default user for new sessions is sa), or tick Use Windows authentication, which uses your current Windows session.
  6. Optionally enter one database in Databases; HeidiSQL then passes it as the database in the connection string, which the source code notes may be required on Azure.
  7. Click Save and Open.

If you see a warning about "insecure TLS 1.0", you selected the old SQLOLEDB provider. HeidiSQL recommends installing the Microsoft OLE DB Driver instead.

SQL Server session defaults in HeidiSQL
SettingDefaultNote
Network typeMicrosoft SQL Server (TCP/IP)Command line value 4
Library (Windows)MSOLEDBSQLSQLOLEDB also listed; it uses TLS 1.0
Port0Auto-detection by the driver, previously 1433
UsersaOr Use Windows authentication
SSH tunnelAvailableTCP/IP network type only
SSL tabNot enabledApplies to MySQL-family and PostgreSQL sessions

SSH tunnel to SQL Server

Unlike MySQL and PostgreSQL, SQL Server has no separate "SSH tunnel" network type; instead the Use SSH tunnel option is enabled for the Microsoft SQL Server (TCP/IP) type. Fill in the SSH tunnel tab as the help page describes for other engines: SSH executable (plink.exe from the installer, or ssh.exe), SSH host and port, SSH user, password or private key file, and a free local port. Set Hostname / IP on the Settings tab to the SQL Server address as seen from the SSH server (often 127.0.0.1), because that host is used for the tunnel's -L forwarding.

Encryption and the SSL tab

The SSL tab (private key, certificate, CA certificate, cipher, verification) is only enabled for MySQL-family and PostgreSQL network types in the HeidiSQL source code, so you cannot set certificate files for a SQL Server session there. Encryption of a SQL Server connection is then left to the driver: the OLE DB provider on Windows, FreeTDS elsewhere. HeidiSQL does not document how to force or verify encryption for SQL Server. If your policy requires a verified encrypted connection, an SSH tunnel is the documented HeidiSQL option, or use a tool built for SQL Server such as SSMS.

SQL Server from Linux and macOS

The Linux and macOS builds come from the Lazarus code base, which leaves out Windows-only parts such as ADO. The README states that SQL Server support is being redeveloped via FreeTDS and is not yet fully mature. The Debian package depends on libsybdb5, the FreeTDS library. Expect gaps compared with the Windows version and check the issue tracker, which has a dedicated label for SQL Server issues. Running the Windows build under Wine is not a reliable workaround: the help page calls Wine quite unstable.

Common SQL Server connection errors

These are server-side SQL Server errors, so they read the same in HeidiSQL as in any other client:

Frequently asked questions

Can HeidiSQL connect to SQL Server?

Yes. SQL Server ("MS SQL") is one of the supported database systems. On Windows it connects through Microsoft's OLE DB providers; on Linux and macOS through FreeTDS, which is less mature.

What port does HeidiSQL use for SQL Server?

By default 0, meaning the driver detects the port. Earlier versions defaulted to 1433. Enter a port if your instance listens on a fixed one.

Does HeidiSQL support Windows authentication for SQL Server?

Yes. Tick Use Windows authentication on the Settings tab; the help page says it is available for MySQL, MariaDB and MS SQL.

Can I use SSL certificates with SQL Server in HeidiSQL?

Not through the SSL tab, which is enabled only for MySQL-family and PostgreSQL sessions. Use an SSH tunnel if you need a documented encrypted path.

Is HeidiSQL a replacement for SSMS?

For browsing data and writing queries it can be. It does not describe SQL Server administration features such as Agent jobs; see our SSMS comparisons and the SSMS review.

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.