Skip to main content

SQL Server (MSSQL)

SQL Server datasources use the ODBC driver and Microsoft ODBC Driver 18 for SQL Server.
See Supported Data Formats for database source categories and schema column types supported on SQL Server connections.

Connection configuration

URI format

Required fields

Optional fields

Environment variables

The ODBC_MSSQL_DRIVER environment variable allows you to use a different version of the Microsoft ODBC driver (e.g., Driver 17) without modifying the connection configuration.

Example connection

Dataset configuration (data_args)

Required fields

Optional fields

table_options entry

Each entry in table_options describes a table to query:

Complete example

Connection

Dataset

Set data_dt_format to true when using native SQL Server datetime2 or datetimeoffset columns. CloudQuant Data Liberator will auto-detect the datetime type and convert directly without string parsing.

Encryption configuration

SQL Server connections support several TLS encryption modes via the encryption field:
When using encryption: "yes" with self-signed certificates, you may need to add TrustServerCertificate=yes to the connection. For production, always use properly signed certificates.

Legacy certificate support

For SQL Server instances using older certificates with negative serial numbers:
This is common with older SQL Server installations that have not rotated their TLS certificates.

Driver and dependencies

The Microsoft ODBC Driver 18 must be installed on the CloudQuant Data Liberator host. To use a different driver version, set the ODBC_MSSQL_DRIVER environment variable.

Troubleshooting

ODBC driver not found

Verify the Microsoft ODBC Driver 18 is installed and registered:
Install the driver if missing:

Using a different driver version

Override the default driver with an environment variable:

Certificate errors (x509)

If you see x509: certificate signed by unknown authority or negative serial number errors:

Connection timeout

SQL Server may be configured to listen on a non-default port or require a named instance. Verify connectivity:

Windows authentication

CloudQuant Data Liberator uses SQL Server authentication (username/password). Windows/Kerberos authentication is not supported through this connection type.

Slow queries

  • Increase batch_size for large result sets (up to 100000).
  • Ensure the datetime and key columns are indexed.
  • For partitioned tables, use dt_regex to scope queries to relevant partitions.
  • Consider using datetime2 over datetime for better precision and performance.