Data source name (DSN) connection properties
The following tables list the connection properties you can set in the DSNs for use with Vertica's ODBC driver.
Required connection properties
These connection properties are the minimum required to create a functioning DSN.
Note
If you use a host name (Servername) whose DNS entry resolves to multiple IP addresses, the client attempts to connect to the first IP address returned by the DNS. If a connection cannot be made to the first address, the client attempts to connect to the second, then the third, continuing until it either connects successfully or runs out of addresses.Property | Description |
---|---|
Driver | The file path and name of the driver used. |
Database | The name of the database running on the server. |
Servername |
The host name or IP address of any active node in a Vertica cluster. You can provide an IPv4 address, IPv6 address, or host name. In mixed IPv4/IPv6 networks, the DNS server configuration determines which IP version address is sent first. Use the You can also use the aliases "server" and "host" for this property. |
UID | The database username. |
Optional properties
Property | Description |
---|---|
Port |
The port number on which Vertica listens for ODBC connections. Default: 5433 |
PWD |
The password for the specified user name. You may insert an empty string to leave this property blank. Default: None, login only succeeds if the user does not have a password set. |
PreferredAddressFamily |
The IP version to use if the client and server have both IPv4 and IPv6 addresses and you have provided a host name, one of the following:
Default: none |
Advanced settings
Property | Description |
---|---|
AutoCommit |
A Boolean value that controls whether the driver automatically commits transactions after executing a DML statement. Default: true |
BackupServerNode |
A string containing the host name or IP address that client libraries can try to connect to if the host specified in ServerName is unreachable. Connection attempts continue until successful or until the list of server nodes is exhausted. Valid values: Comma-separated list of servers optionally followed by a colon and port number. |
ConnectionLoadBalance |
A Boolean value that indicates whether the connection can be redirected to a host in the database other than the ServerNode. This affects the connection only if the load balancing. is set to something other than "none". When the node differs from the node the client is connected to, the client disconnects and reconnects to the targeted node. See About Native Connection Load Balancing in the Administration Guide. Default: false |
ConnSettings |
A string containing SQL commands that the driver should execute immediately after connecting to the server. You can use this property to configure the connection, such as setting a schema search path. Reserved symbol: In the connection string semicolon ( |
ConvertSquareBracketIdentifiers |
Controls whether square-bracket query identifiers are converted to a double quote identifier for compatibility when making queries to a Vertica database. Default: false |
DirectBatchInsert | Deprecated, always set to true. |
DriverStringConversions |
Controls whether the ODBC driver performs type conversions on strings sent between the ODBC driver and the database. Possible values are:
Default: OUTPUT |
Locale |
The locale used for the session. Specify the locale as an ICU Locale. **See **the ICU User Guide for a complete list of properties that can be used to specify a locale. Default: |
PromptOnNoPassword |
[Windows only] Controls whether users are prompted to enter a password, if none is supplied by the connection string or DSN used to connect to Vertica. See Prompting Windows users for passwords. Default: false |
ReadOnly |
A true or false value that controls whether the connection can read data only from Vertica. Default: false |
ResultBufferSize |
Size of memory buffer for the large result sets in streaming mode. A value of 0 means ResultBufferSize is turned off. Default: 131072 (128KB) |
TransactionIsolation |
Sets the transaction isolation for the connection, one of the following:
See Changing Transaction Isolation Levels for an explanation of transaction isolation. Default: Server Default |
Identification
Property | Description | Standard/Vertica |
---|---|---|
Description |
Description for the DSN entry. Required? No Insert an empty string to leave the description empty. |
Standard |
Label / SessionLabel |
Sets a label for the connection on the server. This value appears in the client_label column of the V_MONITOR.SESSIONS system table. Label and SessionLabel are synonyms and can be used interchangeably. |
Vertica |
OAuth connection parameters
The following connection properties pertain to OAuth in ODBC.
Caution
The unixODBC driver manager supports parameter values of up to 1000 characters inodbc.ini
. If your parameter value is greater than 1000 characters (for example, OAuthAccessToken), you must pass it through a connection string rather than specifying it in odbc.ini
.
Property | Description |
---|---|
OAuthAccessToken | Required if OAuthRefreshToken is unspecified, an OAuth token that authorizes a user to the database. |
OAuthRefreshToken |
Required if OAuthAccessToken is unspecified, allows a user to refresh and obtain a new OAuthAccessToken when their old one expires. This property is part of a set; all of the following properties must be set to enable token refresh:
In cases where introspection fails (e.g. when the access token expires), Vertica responds to the request with an error. If introspection fails and OAuthRefreshToken is specified, the driver attempts to refresh and silently retrieve a new access token. Otherwise, the driver passes error to the client application. |
OAuthClientId |
The client ID of the client application registered in the identity provider. This property is part of a set; all of the following properties must be set to enable token refresh:
|
OAuthClientSecret |
The client secret of the client application registered in the identity provider. This property is part of a set; all of the following properties must be set to enable token refresh:
|
OAuthTokenUrl |
The endpoint to which token refresh requests are sent. This property is part of a set; all of the following properties must be set to enable token refresh:
Examples: |
OAuthDiscoveryUrl |
Also known as the OpenID Provider Configuration Document, this endpoint points to a If you specify this parameter, you do not have to set the OAuthTokenUrl. The driver automatically resolves the OAuthTokenUrl. If you specify both the OAuthDiscoveryUrl and OAuthTokenUrl, the OAuthDiscoveryUrl takes precedence. |
OAuthScope |
The requested OAuth scopes, delimited with spaces. These scopes define the extent of access to the resource server (in this case, Vertica) granted to the client by the access token. For details, see the OAuth documentation. For example, to request the scopes
|
Encryption
Property | Description | Standard/Vertica |
---|---|---|
SSLMode |
Controls whether the connection to the database uses SSL encryption. Valid values follow. For descriptions of these values, refer to Configuring TLS for ODBC Clients.
Default: prefer |
Vertica |
SSLCertFile | The absolute path of the client's public certificate file. This file can reside anywhere on the system. | Vertica |
SSLKeyFile | The absolute path to the client's private key file. This file can reside anywhere on the system. | Vertica |
Third-party compatibility
Kerberos connection properties
Use the following properties for client authentication using Kerberos.
Property | Description | Standard/Vertica |
---|---|---|
KerberosServiceName |
Provides the service name portion of the Vertica Kerberos principal; for example: Default: vertica |
Vertica |
KerberosHostname |
Provides the instance or host name portion of the Vertica Kerberos principal; for example: Default: Value specified in the servername connection string property |
Vertica |