This string includes the options you may need to connect with TLS/SSL encryption and user ID and password authentication. For more information, see "TLS/SSL data encryption."
Note: The strings demonstrated in this section use the DSN-less format. For additional formats, see "Using a connection string."

This string includes the options used to connect through a proxy server with authentication.

DRIVER=DataDirect 8.1 MongoDB;CryptoProtocolVersion=protocol;
  DatabaseName=database;EncryptionMethod=1;HostName=hostname;
  HostNameInCertificate=host;KeyPassword=key_password;KeyStore=key_store;
  PortNumber=port;TrustStore=trust_store;TrustStorePassword=ts_password;
  ValidateServerCertificate=vsc_value;User=user_name;Password=password;
  [attribute=value[;...]];

where:

protocol

(optional) specifies a cryptographic protocol or comma-separated list of cryptographic protocols that can be used when SSL is enabled. For example, TLSv1.3,TLSv1.2.

database
(optional) specifies the name of the database to which you want to connect. This value is used as the default qualifier for unqualified table names in SQL queries.
Note: This value is case-insensitive if you have access privileges to query the list of databases on the server. If you do not have access, this value is case-sensitive.
hostname
the name or the IP address of the server to which you want to connect. For example, myserver.
host

(optional) specifies the host name to be used to validate the certificate. The HostNameInCertificate property provides additional security against man-in-the-middle (MITM) attacks by ensuring that the server the driver is connecting to is the server that was requested.

key_password

(optional) specifies the password of the keystore file, if your database server is configured for SSL client authentication. Alternatively, you can set the corresponding Java system property javax.net.ssl.keyStorePassword, in lieu of this option.

key_store

(optional) specifies the location of the keystore file, if your database server is configured for SSL client authentication. Alternatively, you can set the corresponding Java system property, javax.net.ssl.keyStore, in lieu of this property.

trust_store

(optional) specifies the location of the truststore file used for SSL server authentication. Alternatively, you can set the corresponding Java system property, javax.net.ssl.trustStore, in lieu of this property.

ts_password

(optional) specifies the password of the truststore file used for SSL server authentication. Alternatively, you can set the corresponding Java system property, javax.net.ssl.trustStorePassword, in lieu of this option.

vsc_value

(optional) specify true to validate certificates sent by the database server.

port

specifies the port number of the server listener. The default is 27017.

user_name
specifies the user name that is used to connect to the MongoDB database. For example, jsmith.
password
specifies the password used to connect to your MongoDB database.
attribute=value
specifies connection option settings. Multiple option attributes are separated by a semi-colon.
Note: The User and Password options are not required to be stored in the connection string. They can also be sent separately by the application using the SQLConnect ODBC API. For SQLDriverConnect and SQLBrowseConnect, they will need to be specified in the connection string.

The following example connection string includes the minimum options required for connecting with data encryption, and user ID and password authentication:

DRIVER=DataDirect 8.1 MongoDB;DatabaseName=mydb;EncryptionMethod=1;HostName=myserver;
       PortNumber=27017;User=jsmith;Password=secret;