> ## Documentation Index
> Fetch the complete documentation index at: https://docs.major.build/llms.txt
> Use this file to discover all available pages before exploring further.

# Microsoft SQL Server

> Connect Major to SQL Server, choose an encryption mode, and see which servers support TLS 1.3 and post-quantum key exchange.

The Microsoft SQL Server connector runs queries and explores schemas in a SQL Server database. It uses shared authentication: one SQL login for everyone who uses the connector. For how connectors store credentials and reach your database, see [Connectors](https://docs.major.build/learn/connectors/overview.md).

## Connection settings

| Setting | Description |
| - | - |
| Host | The server's hostname or IP address. |
| Port | The TCP port. Defaults to `1433`. |
| Database name | The database to connect to. |
| Username | A SQL Server login. Use a read-only login if the connector should only read. |
| Password | The login's password. Stored encrypted. |
| Use strict encryption (TDS 8.0) | Off by default. See [Encryption](#encryption). |
| CA certificate | The PEM-encoded certificate of the CA that signed the server's certificate. Shown only with strict encryption, and optional. |

## Encryption

Every connection to SQL Server is encrypted. **Use strict encryption** picks the protocol:

* **Off** (default) - TDS 7.x, which negotiates TLS inside the SQL Server login and supports TLS 1.2 at most. Major doesn't verify the server's certificate in this mode, so it works with SQL Server's default self-signed certificate. This works with every supported SQL Server version.
* **On** - TDS 8.0, which starts TLS before anything else is sent. This is the only mode that can use TLS 1.3. Major verifies the server's certificate and its hostname. Strict encryption requires SQL Server 2022 or later on Windows, SQL Server 2025 or later on Linux, or Azure SQL.

To turn on strict encryption:

1. Make sure the server presents a certificate whose name matches the **Host** you connect with.
2. Check **Use strict encryption (TDS 8.0)**.
3. If the certificate is signed by a private CA or is self-signed, upload that CA's certificate (or the self-signed certificate) as **CA certificate**. A certificate from a publicly trusted CA, such as Azure SQL's, needs nothing here.

If the server doesn't support TDS 8.0 or the certificate can't be verified, the connection fails. Major doesn't fall back to TDS 7.x.

## Post-quantum TLS

Major offers hybrid post-quantum key exchange (X25519MLKEM768) on every TLS 1.3 connection. It protects the connection against traffic recorded today being decrypted later by a quantum computer. If the server doesn't support it, the connection uses classical key exchange (X25519 or P-256).

For SQL Server, TLS 1.3 needs strict encryption, so post-quantum key exchange is only possible in strict mode. Whether it's used then depends on the server:

| Server | TLS 1.3 | Post-quantum key exchange |
| - | - | - |
| SQL Server 2019 or earlier | No | No |
| SQL Server 2022+ on Windows Server 2019 or earlier | No (TLS 1.2 only) | No |
| SQL Server 2022+ on Windows Server 2022 or later | Yes, in strict mode | Only if the server's TLS stack supports ML-KEM |
| SQL Server 2025 on Linux | Yes, in strict mode | Only if the server's OpenSSL is 3.5 or later |

Without strict encryption, connections use TLS 1.2 and classical key exchange, whatever the server supports.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.