Microsoft SQL Server

Microsoft SQL Server is a relational database management system. Evidence supports connecting to SQL Server as a data source, allowing you to query data using SQL.

Add a New MSSQL Data Source

  1. Start the Evidence dev server: npm run dev or Start Evidence using the VSCode extension.
  2. Navigate to the settings page, also accessible via the ... menu in the top right.
  3. Click the New Source button.
  4. Select MSSQL as the data source type.
  5. Enter the configuration options for the connection.
  6. Click the Test button to confirm the connection is successful.
  7. Click the Save button to save the connection.
  8. Your configuration options are saved in two files:
    • /sources/[source_name]/connections.yaml: Non-sensitive values, source controlled.
    • /sources/[source_name]/connection.options.yaml: Sensitive values, not source controlled, base-64 encoded.

Configuration

Trust Server Certificate

The trustServerCertificate option indicates whether the channel will be encrypted while bypassing walking the certificate chain to validate trust. This option is disabled by default.

Encrypt

The encrypt option indicates whether SQL Server uses SSL encryption for all data sent between the client and server if the server has a certificate installed. Necessary for Azure databases.

Connection Timeout

The connection_timeout option indicates the connection timeout limit, in milliseconds. It defaults to 15000 ms.

Request Timeout

The request_timeout option indicates the time, in milliseconds, that a query can run before it is terminated. It defaults to 15000 ms.