An SSH tunnel offers an additional layer of security by routing database traffic through a secure channel. Microsoft SQL Server (MSSQL) enables tunnel options.

This page describes what you need to enter on the Connection credentials screen to create an MSSQL connection. The credentials change based on which tunnel method you choose.

There are two tunnel methods: No Tunneling and SSH Tunnel Key Authentication.

If you select No Tunneling as the SSH tunneling option, complete these fields:

Connection credentials fieldsDescription
SSH TunnelingSelect No Tunneling.
UsernameThe authentication user name.
PasswordThe password required to authenticate.
Host

The MSSQL host domain. You can get the host from the administrator of your MSSQL or Azure SQL instance.

See the Hostname in Certificate section below for more information.

Port

The MSSQL port number. You can get the port number from the administrator of your MSSQL or Azure SQL instance.

A typical port number is 1433.

DatabaseThe MSSQL database name.
Schemas

The MSSQL database schema. This field is optional. 

You can enter a single schema name, or leave the field empty. If empty, Data Orchestrator retrieves all schemas.

Hostname in CertificateThe host name that is used in the MSSQL certificate.
CA Certificate

The unencrypted Certificate Authority (CA) certificate in Privacy-Enhanced Mail (PEM) format.

For more information, see the CA certificate section below.

If you use SSH Tunnel Key Authentication, complete these fields:

Connection credentials fieldsDescription
SSH TunnelingSelect SSH Tunneling Key Authentication if you want to connect with an SSH tunnel.
UsernameThe authentication user name.
PasswordThe password required to authenticate.
HostThe MSSQL host domain. You can get the host from the administrator of your MSSQL or Azure SQL instance.
Port

The MSSQL port number. You can get the port number from the administrator of your MSSQL or Azure SQL instance.

A typical port number is 1433.

DatabaseThe MSSQL database name.
Schemas

The MSSQL database schema. This field is optional. 

You can enter a single schema name, or leave the field empty. If empty, Data Orchestrator retrieves all schemas.

SSH Login UsernameThe username used to authenticate the SSH tunnel login.
SSH Private Key

The private key in unencrypted PEM format used for SSH authentication.

Use the following command to decode the SSH private key: echo <ssh_private_key> | base64 --decode

Make sure the decoded certificate includes the entire content, exactly as generated. This includes the lines and carriage returns between​ them. Don't modify, trim, or remove any lines or white space within the block.

Example of an unencrypted CA certificate in PEM format:

-----BEGIN PRIVATE KEY-----
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDxq...
... (Your private key content in Base64) ...
... multiple lines ...
-----END PRIVATE KEY-----

SSH Tunnel Jump Server HostThe hostname or IP address of the SSH Jump Server that acts as the tunnel.
SSH Connection PortThe SSH port number.
Hostname in Certificate

The host name that is used in the MSSQL certificate.

See the Hostname in Certificate section below for more information.

CA Certificate

The unencrypted Certificate Authority (CA) certificate in Privacy-Enhanced Mail (PEM) format.

For more information, see the CA certificate section below.

The MSSQL connector supports TLS/SSL encryption. TLS/SSL encryption enables you to establish a secure, encrypted connection to MSSQL instances. It protects data in transit from being intercepted or read by unauthorized parties. The connection is secured using a digital certificate installed on the MSSQL server. You need a valid client to ensure a connection to the correct host. This offers another layer of data protection.

The Hostname in Certificate field must match one of the names in the SQL Server’s TLS certificate. You can use either: 

  • The Common Name (CN) in the certificate’s Subject field.
  • Any DNS Name entry listed in the Subject Alternative Name (SAN).

The driver checks the CN first, then checks each DNS entry in the SAN. It accepts the first one that matches. IP address entries in the SAN aren’t considered.

The Hostname in Certificate value is compared with the names in the certificate. It’s never looked up in DNS, so it doesn’t need to be a valid DNS name. If the certificate lists a short name, such as server, you can enter that name (server). The connection itself still uses the address specified in the Host field.

The hostname validation is case-insensitive.

We recommend that you use the same hostname as specified in the Host field. This is typically the fully qualified domain name (FQDN), such as server.company.com, as long as this name is included in the SQL Server’s TLS certificate. 

If the Host field contains an IP address or an alias that is not listed in the certificate, enter a hostname that matches either the: 

  • Common Name (CN)
  • DNS name in the Subject Alternative Name (SAN)

To identify the correct hostname for the Hostname in Certificate field, you can inspect the SQL Server’s TLS certificate. Common names are listed as Subject, and DNS names are listed as Subject Alternative Names (SAN). 

Use one of these methods to see the certificate details:

  • OpenSSL: If the certificate is available as a PEM file, use this command to display the certificate’s Subject and Subject Alternative Name (SAN) information:
    openssl x509 -in certificate.pem -noout -subject -ext subjectAltName
    Check the Common Name (CN) in the Subject and the DNS names listed in the Subject Alternative Name (SAN).
  • Windows: Open the certificate and select the Details tab. Check the Subject field for the Common Name (CN) value, and the Subject Alternative Name (SAN) field for DNS name entries.
  • SQL Server Configuration Manager: Use SQL Server Configuration Manager to identify the TLS certificate configured for the SQL Server instance. Once the certificate has been identified, inspect its details to find the Common Name (CN) and DNS names in the Subject Alternative Name (SAN).

You must use an unencrypted Certificate Authority (CA) certificate in Privacy-Enhanced Mail (PEM) format. The certificate must also be Base64 encoded. Both public and private/internal Certificate Authorities (CAs) are supported. 

For the CA certificate field:

  • Provide the certificate of the CA that directly issued the SQL Server’s TLS certificate. 
  • If an intermediate CA issued the server certificate, provide that intermediate CA certificate. 
  • If the root CA issued the server certificate directly, provide the root CA certificate.
  • Only one CA certificate should be provided, rather than the full certificate chain.

This table lists the supported formats for the CA certificate:

ItemFormat
PEM (Base64) format

The CA certificate must be in this PEM (Base64) text format:
-----BEGIN CERTIFICATE----- to -----END CERTIFICATE-----

For example:

-----BEGIN CERTIFICATE-----
MIIDBzCCAe+....................
.......multiple line...........
-----END CERTIFICATE-----

Binary .cer/.der files and .p7b bundles

Binary .cer/.der files and .p7b bundles must be converted first. Use these commands to convert the files:

  • openssl x509 -inform der -in ca.cer -out ca.pem
  • openssl pkcs7 -print_certs -in chain.p7b -out chain.pem, then copy only the issuing CA’s block.
Exported certificateOn Windows, export the certificate in this format: Base-64 encoded X.509 (.CER)

A CA certificate is required even if the SQL Server’s TLS certificate was issued by a public CA. Anaplan doesn’t use a built-in list of trusted public CAs for this connection.

Don’t provide SQL Server’s own certificate instead of the issuing CA certificate. This might cause the connection to fail when the server certificate is renewed.

Don’t include a private key.

Note: If you need to edit the connection, you must enter the CA certificate again.