Connection string examples
- Last Updated: February 14, 2025
- 3 minute read
- DataDirect Connectors
- ODBC
- Microsoft SQL Server 8.0
- Documentation
ODBC provides a method for specifying connection information via a connection string and the SQLDriverConnect API. This section provides examples of connection strings configured to use common features and functionality. You can modify and/or combine these examples to create a connection string for your environment.
In addition to the connection strings for DSN-less connections demonstrated in this section, the driver supports DSN and File DSN connection strings. See "Using a connection string" for syntax and detailed information for supported connection string types.
AuthenticationMethod=13) and Entra ID authentication with service
principal user (AuthenticationMethod=36). The examples given in this section
to demonstrate how to configure the driver to use connection pooling, connection failover,
DataDirect Bulk Load, TLS/SSL client and server authentication, and Always Encrypted use user
ID and password for authentication. For Microsoft Fabric, use one of the supported
authentication methods instead of user ID and password when configuring connection strings for
these features.- User ID and password authentication
- Kerberos authentication
- Microsoft Entra ID authentication
- TLS/SSL client authentication
- TLS/SSL server authentication
- Always Encrypted
- Connection failover
- Connection pooling
User ID and password authentication
This string includes the options used to connect using the default authentication method, user ID and password authentication (Encrypt Password).
DRIVER=DataDirect 8.0 SQL Server Wire Protocol;HostName=MyServer;
PortNumber=1433;Database=MyDatabase;LogonID=jsmith;Password=secret;
Kerberos authentication
This string includes the options used to connect using Kerberos authentication.
DRIVER=DataDirect 8.0 SQL Server Wire Protocol;AuthenticationMethod=4;
HostName=MyServer;PortNumber=1433;Database=MyDatabase;
GSSClient=native;LogonID=jsmith;
For more information on these options and values, see Kerberos authentication.
Microsoft Entra ID authentication
- User and password
authentication:
DRIVER=DataDirect 8.0 SQL Server Wire Protocol;AuthenticationMethod=13; Database=MyDB;HostName=myserver.database.windows.net; HostNameInCertificate=*.database.windows;PortNumber=1433; TrustStore=\<truststore_path>\ca-bundle.crt; ValidateServerCertificate=1;LogonID=test@domain.com;Password=secret; - Service principal user
authentication:
DRIVER=DataDirect 8.0 SQL Server Wire Protocol;AuthenticationMethod=36; Database=MyDB;HostName=myserver.database.windows.net; HostNameInCertificate=*.database.windows;PortNumber=1433; TrustStore=\<truststore_path>\ca-bundle.crt; LogonID=1234ABCD-1234-ABCD-1234-abcd1234ABCD1234; Password=ABcdEFg/hiJkLmNOPqR01stUvWxyzYx2wvUTsrQpO=; - Managed identity
authentication:
DRIVER=DataDirect 8.0 SQL Server Wire Protocol;AuthenticationMethod=37; Database=MyDB;HostName=myserver.database.windows.net; HostNameInCertificate=*.database.windows;PortNumber=1433; TrustStore=\<truststore_path>\ca-bundle.crt; LogonID=1234ABCD-1234-ABCD-1234-abcd1234ABCD1234;
For more information on these options and values, see Microsoft Entra ID authentication.
TLS/SSL client authentication
This string configures
the driver to use the TLS/SSL client authentication method. In this configuration, since
ValidateServerCertificate=1, the driver validates the certificate sent by
the server and the host name specified by
HostNameInCertificate.
DRIVER=DataDirect 8.0 Progress SQL Server Wire Protocol;EncryptionMethod=1;
HostName=MyServer;HostNameInCertificate=MySubjectAltName;
Database=MyDatabase;PortNumber=1433;Keystore=KeyStoreName;
ValidateServerCertificate=1;LogonID=jsmith;Password=secret; For more
information on these options and values, see TLS/SSL client authentication.TLS/SSL server authentication
This string configures
the driver to use the TLS/SSL server authentication method. In this configuration, since
ValidateServerCertificate=1, the driver validates the certificate sent by
the server and the host name specified by
HostNameInCertificate.
DRIVER=DataDirect 8.0 Progress SQL Server Wire Protocol;HostName=MyServer;
PortNumber=1433;Database=MyDatabase;EncryptionMethod=1;
HostNameInCertificate=MySubjectAltName;Truststore=TrustStoreName;
TruststorePassword=TSXYZZY;ValidateServerCertificate=1;LogonID=jsmith;
Password=secret; For more information on these options and values, see
TLS/SSL server authentication.Always Encrypted
- Windows Certificate
Store:
DRIVER=DataDirect 8.0 SQL Server Wire Protocol;ColumnEncryption=Enabled; Database=MyDB;HostName=MyServer;PortNumber=1433; LogonID=jsmith;Password=secret; - Azure Key
Vault:
DRIVER=DataDirect 8.0 SQL Server Wire Protocol;ColumnEncryption=Enabled; AEKeystorePrincipalId=789a8b7c-6d5e-432f-1gh2-3ijk45678987; AEKeyStoreClientSecret=ABcdEFg/hiJkLmNOPqR01tuVwXwyzYw2xwVUtsRQ; Database=MyDB;HostName=MyServer;PortNumber=1433; LogonID=jsmith;Password=secret; - PKCS #12
File:
DRIVER=DataDirect 8.0 SQL Server Wire Protocol;ColumnEncryption=Enabled; AEKeyStoreLocation=C:\abc\keystore.pfx; AEKeyStoreSecret=ABcdEFg/hiJkLmNOPqR01tuVwXwyzYw2xwVUtsRQ; Database=MyDB;HostName=MyServer;PortNumber=1433; LogonID=jsmith;Password=secret;
For more information on these options and values, see Always Encrypted.
Connection failover
- The driver attempts to retry connection up to four times if the initial attempt fails.
- The driver waits five seconds between connection attempts.
- The driver attempts primary and alternate servers in random order.
DRIVER=DataDirect 8.0 Progress SQL Server Wire Protocol;HostName=MyServer;
PortNumber=1433;Database=MyDatabase;
AlternateServers=(HostName=MyAltServer:PortNumber=1434:Database=MyAltDB,
HostName=MyBackUpServer:PortNumber=1435:Database=MyBackUpDB);
ConnectionRetryCount=4;ConnectionRetryDelay=5;LoadBalancing=1;
LogonID=jsmith;Password=secret; For more information on these options and
values, see Using failover.Connection pooling
- The driver does not reset the state of connections that are removed from the connection pool for reuse by the application.
- The driver does not allow inactive connections to remain open in the connection pool.
- The driver allows a maximum of 100 and a minimum of 0 connections in the pool.
DRIVER=DataDirect 8.0 SQL Server Wire Protocol;Pooling=1;
ConnectionReset=0;LoadBalanceTimeout=0;MaxPoolSize=100;
MinPoolSize=0;HostName=MyServer;PortNumber=1433;
Database=MyDB;LogonID=John;Password=secret; For more information on these
options and values, see Using DataDirect Connection Pooling.