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.

See the following sections for connection string examples.

User ID and password authentication

This string includes the options used to connect using basic user name and password authentication.

DRIVER=DataDirect 8.0 Snowflake;AccountName=MyAccountName.us-east-1;
   DatabaseName=MyDB;Schema=MySchema;Warehouse=MyWH;User=JohnQPublic;
   Password=SECRET;

For more information on these options and values, see User ID and password authentication.

Browser-based SSO authentication

This string includes the options used to connect using browser-based SSL authentication.
DRIVER=DataDirect 8.0 Snowflake;AccountName=MyAccountName.us-east-1;
   AuthenticationMethod=45;DatabaseName=MyDB;Schema=MySchema;Warehouse=MyWH;
   User=JohnQPublic;
For more information on these options and values, see Browser-based SSO authentication.

Key-pair authentication

This string includes the options used to connect using key-pair authentication.
DRIVER=DataDirect 8.0 Snowflake;AccountName=MyAccountName.us-east-1;
   AuthenticationMethod=21;DatabaseName=MyDB;Schema=MySchema;Warehouse=MyWH;
   User=JohnQPublic;PrivateKeyFile=C:\Program Files\privatekey.p8;
   PrivateKeyPassphrase=abc123;
For more information on these options and values, see Key-pair authentication.

OAuth 2.0 authentication

This string includes the options required for the OAuth 2.0 refresh token grant.

DRIVER=DataDirect 8.0 Snowflake;AuthenticationMethod=24;
   AccountName=account_name.us-east-1;DatabaseName=MyDB;Schema=MySchema;Warehouse=MyWH;
   ClientId=cd34efg5678h9ij87klm6543no32pqr10st987;
   ClientSecret=098zyx765wvu432tsr123qpo456;
   TokenURI=https://account_name.us-east-1.snowflakecomputing.com/oauth/token-request;
   RefreshToken=abc12cd34efg5678h9ij87klm6543no32pqr10;
For more information on these options and values, see OAuth 2.0 authentication.

Proxy server

This string includes the options used to connect through a proxy server using user ID and password authentication.
DRIVER=DataDirect 8.0 Snowflake;AccountName=MyAccountName.us-east-1;
   DatabaseName=MyDB;Schema=MySchema;Warehouse=MyWH;User=JohnQPublic;
   Password=SECRET;ProxyHost=pserver;ProxyPassword=proxys3cr3t;
   ProxyPort=1234;ProxyUser=jsmith;
For more information on these options and values, see Proxy server support.