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 key | Default Value | Description |
|---|---|---|
| abortTransactionOnError | A 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. | |
| appName | Application name used for SQL server logging. | |
| instanceName | The 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. | |
| useUTC | true | A boolean determining whether or not use UTC time for values without time zone offset (default: true). |
| encrypt | true | A boolean determining whether or not the connection will be encrypted. |
| tdsVersion | 7_4 | The 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[].dialectOptionsin favor ofsqltools.connections[].mssqlOptions.
Connection Options
askForPasswordbooleanAsk for password at connection time instead of storing it as plaintext in your settings.
Ask for password at connection time instead of storing it as plaintext in your settings.
| Type | boolean |
| Default Value | false |
connectionTimeoutnumberConnection timeout in seconds.
Connection timeout in seconds.
| Type | number |
| Default Value | 15 |
connectStringstring | nullConnect string. Support for Oracle, PostgreSQL and AWS Redshift.
Connect string. Support for Oracle, PostgreSQL and AWS Redshift.
| Type | string or null |
cqlOptionsobject | nullSee https://docs.datastax.com/en/developer/nodejs-driver/4.1/api/type.ClientOptions/ for more details.
See https://docs.datastax.com/en/developer/nodejs-driver/4.1/api/type.ClientOptions/ for more details.
| Type | object or null |
| Default Value | {} |
databasestringDatabase name.
Database name.
| Type | string |
dialectstringConnection Driver
Connection Driver
| Type | string |
domainstring | nullConnection domain (for MSSQL only).
Connection domain (for MSSQL only).
| Type | string or null |
driverstringConnection driver used for this connection.
Connection driver used for this connection.
| Type | string |
groupstringConnection group name.
Connection group name.
| Type | string |
mssqlOptionsnull | objectSee https://vscode-sqltools.mteixeira.dev/en/drivers/microsoft-sql-server-azure#11-specific-options for more details.
See https://vscode-sqltools.mteixeira.dev/en/drivers/microsoft-sql-server-azure#11-specific-options for more details.
| Type | null or object |
| Default Value | {} |
| Property | Description | Type |
|---|---|---|
| encrypt | Encrypt connection. | boolean or null |
namestringConnection name.
Connection name.
| Type | string |
passwordstring | nullConnection password
Connection password
| Type | string or null |
portnumberPort for connection.
Port for connection.
| Type | number |
previewLimitnumberMaximum number of records to return in table previews.
Maximum number of records to return in table previews.
| Type | number |
| Default Value | 50 |
serverstringServer address.
Server address.
| Type | string |
| Default Value | 127.0.0.1 |
usernamestringConnection username.
Connection username.
| Type | string |
variablesobject | nullConnection variables in a key/value pair format. Use this property with sqltools.queryParams.enableReplace to replace the variables without prompting.
Connection variables in a key/value pair format. Use this property with sqltools.queryParams.enableReplace to replace the variables without prompting.
| Type | object or null |
| Default Value | null |
| Property | Description | Type |
|---|