SQL Server

The sqlserver driver connects to Microsoft SQL Server using Tiberius.

URL format

sqlserver://[<user>[:<password>]@]<host>[:<port>][/<database>][?<options>]

Options

OptionBehavior / default
encrypttrue/yes requires encryption (default). false/no uses Tiberius Off mode; DANGER_PLAINTEXT disables encryption support.
TrustServerCertificateSkip certificate validation when true/yes; default false. Cannot be combined with TrustServerCertificateCA.
TrustServerCertificateCACertificate-authority file for validating the server.
IntegratedSecurityUse Windows integrated authentication when true/yes; default false. Available only on Windows.
ApplicationNameApplication name reported to the server; alias Application Name.
serverOverride the URL host, optionally as tcp:host,port.
databaseOverride the URL database.
uid / username / user / user idOverride the URL username.
password / pwdOverride the URL password.
encryptionLegacy setting: off, on, not_supported, or required. Used only when encrypt is absent.

Examples

rsql --url 'sqlserver://user:password@db.example.com:1433/example?encrypt=true&ApplicationName=rsql' -- 'SELECT @@VERSION;'
rsql --url 'sqlserver://localhost/example?IntegratedSecurity=true'

Usage notes

Options are case-insensitive. The default host is localhost and the default port is 1433. The server chooses the database if omitted. Boolean options accept true, false, yes, and no. Use .schemas, .tables, and .describe to inspect accessible objects.