MSSQL, SQL Server, Azure

Microsoft SQL Server/Azure Start Guide

1. Connections

Connection example:

{
  "name": "MSSQL",
  "server": "localhost",
  "driver": "MSSQL",
  "port": 1433,
  "database": "test_db",
  "username": "sa",
  "askForPassword": false,
  "password": "root(!)Password",
  "connectionTimeout": 15
}

1.1 Specific Options

MSSQL driver specific options can be passed using mssqlOptions settings.

{
  "name": "MSSQL",
  "server": "localhost", // You can use 'localhost\\instance' to connect to named instance
  "driver": "MSSQL",
  "port": 1433,
  "database": "test_db",
  "username": "sa",
  "askForPassword": false,
  "password": "root(!)Password",
  "connectionTimeout": 15,
  "mssqlOptions": {
    ... // options
  }
Option keyDefault ValueDescription
abortTransactionOnErrorA boolean determining whether to rollback a transaction automatically if any error is encountered during the given transaction’s execution. This sets the value for XACT_ABORT during the initial SQL phase of a connection.
appNameApplication name used for SQL server logging.
instanceNameThe instance name to connect to. The SQL Server Browser service must be running on the database server, and UDP port 1434 on the database server must be reachable.
useUTCtrueA boolean determining whether or not use UTC time for values without time zone offset (default: true).
encrypttrueA boolean determining whether or not the connection will be encrypted.
tdsVersion7_4The version of TDS to use (default: 7_4, available: 7_1, 7_2, 7_3_A, 7_3_B, 7_4).

You can use any setting defined in See https://github.com/tediousjs/node-mssql/#tedious also extra options defined in Tedious specific options

Breaking changes

v0.19.x

  • Removed deprecated (v0.17.6) sqltools.connections[].dialectOptions in favor of sqltools.connections[].mssqlOptions.