A Data Source Name (DSN) is the logical name that is used by Open Database Connectivity (ODBC) to refer to the driver and other information that is required to access data from a data source.
A Data Source Name (DSN) is the logical name that is used by Open Database Connectivity (ODBC) to refer to the driver and other information that is required to access data from a data source. Whether you are developing your own ODBC client code or you are using a third-party tool that needs to access Vertica using ODBC, you need to configure and test a DSN. The method you use depends upon the client operating system you are using.
Refer to the following sections for information specific to your client operating system.
1 - Creating an ODBC DSN for Linux
You define DSN on Linux and other UNIX-like platforms in a text file.
You define DSN on Linux and other UNIX-like platforms in a text file. Your client's driver manager reads this file to determine how to connect to your Vertica database. The driver manager usually looks for the DSN definitions in two places:
/etc/odbc.ini
~/.odbc.ini (a file named .odbc.ini in the user's home directory)
Users must be able to read the odbc.ini file in order to use it to connect to the database. If you use a global odbc.ini file, consider creating a UNIX group with read access to the file. Then, add the users who need to use the DSN to this group.
The structure of these files is the same—only their location differs. If both files are present, the ~/.odbc.ini file usually overrides the system-wide /etc/odbc.ini file.
Note
See your ODBC driver manager's documentation for details on where these files should be located and any other requirements.
odbc.ini file structure
The odbc.ini is a text file that contains two types of lines:
Section definitions, which are text strings enclosed in square brackets.
Parameter definitions, which contain a parameter name, an equals sign (=), and then the parameter's value.
Caution
The unixODBC driver manager supports parameter values of up to 1000 characters in odbc.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.
The first section of the file is always named [ODBC Data Sources], and contains a list of all the DSNs that the odbc.ini file defines. The parameters in this section are the names of the DSNs, which appear as section definitions later in the file. The value is a text description of the DSN and has no function. For example, an odbc.ini file that defines a single DSN named Vertica DSN could have this ODBC Data Sources section:
[ODBC Data Sources]
VerticaDSN = "vmartdb"
Appearing after the ODBC data sources section are sections that define each DSN. The name of a DSN section must match one of the names defined in the ODBC Data Sources section.
Configuring the odbc.ini file:
To create or edit the DSN definition file:
Using the text editor of your choice, open odbc.ini or ~/.odbc.ini.
Create an ODBC Data Sources section and define a parameter:
Whose name is the name of the DSN you want to create
Whose value is a description of the DSN
For example, to create a DSN named VMart, you would enter:
[ODBC Data Sources]
VMart = "VMart database on Vertica"
Create a section whose name matches the DSN name you defined in step 2. In this section, you add parameters that define the DSN's settings. The most commonly-defined parameters are:
Description – Additional information about the data source.
Driver – The location and designation of the Vertica ODBC driver, or the name of a driver defined in the odbcinst.ini file (see below). For future compatibility, use the name of the symbolic link in the library directory, rather than the library file:
(
/opt/vertica/lib, on 32-bit clients
/opt/vertica/lib64, on 64-bit clients
For example, the symbolic link for the 64-bit ODBC driver library is:
/opt/vertica/lib64/libverticaodbc.so
The symbolic link always points to the most up-to-date version of the Vertica client ODBC library. Use this link so that you do not need to update all of your DSNs when you update your client drivers.
Database – The name of the database running on the server. This example uses vmartdb for the vmartdb.
ServerName — The name of the server where Vertica is installed. Use localhost if Vertica is installed on the same machine.
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 PreferredAddressFamily option to force the connection to use either IPv4 or IPv6.
UID — Either the database superuser (same name as database administrator account) or a user that the superuser has created and granted privileges. This example uses the user name dbadmin.
PWD —The password for the specified user name. This example leaves the password field blank.
Port — The port number on which Vertica listens for ODBC connections. For example, 5433.
ConnSettings — Can contain SQL commands separated by a semicolon. These commands can be run immediately after connecting to the server.
SSLKeyFile — The file path and name of the client's private key. This file can reside anywhere on the system.
SSLCertFile —The file path and name of the client's public certificate. This file can reside anywhere on the system.
Locale — The default locale used for the session. By default, the locale for the database is: en_US@collation=binary (English as in the United States of America). Specify the locale as an ICU Locale. See the ICU User Guide (http://userguide.icu-project.org/locale) for a complete list of parameters that can be used to specify a locale.
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:
ipv4: Connect to the server using IPv4.
ipv6: Connect to the server using IPv6.
none: Use the IP address provided by the DNS server.
Instead of giving the path of the ODBC driver library in your DSN definitions, you can use the name of a driver defined in the odbcinst.ini file. This method is useful method if you have many DSNs and often need to update them to point to new driver libraries. It also allows you to set some additional ODBC parameters, such as the threading model.
Just as in the odbc.ini file, odbcinst.ini has sections. Each section defines an ODBC driver that can be referenced in the odbc.ini files.
In a section, you can define the following parameters:
Description— Additional information about the data source.
Driver— The location and designation of the Vertica ODBC driver, such as
/opt/vertica/lib64/libverticaodbc.so
If you are using the unixODBC driver manager, you should also add an ODBC section to override its standard threading settings. By default, unixODBC serializes all SQL calls through ODBC, which prevents multiple parallel loads. To change this default behavior, add the following to your odbcinst.ini file:
[ODBC]
Threading = 1
Configuring additional ODBC settings
On Linux and UNIX systems, you need to configure some additional driver settings before you can use your DSN. See ODBC driver settings for details.
1.1 - Testing an ODBC DSN using isql
The unixODBC driver manager includes a utility named isql, which is a simple ODBC command-line client.
The unixODBC driver manager includes a utility named isql, which is a simple ODBC command-line client. It lets you to connect to a DSN to send commands and receive results, similarly to vsql.
To use isql to test a DSN connection:
Run the following command:
$ isql –v DSNname
Where DSNname is the name of the DSN you created.
A connection message and a SQL prompt display. If they do not, you could have a configuration problem or you could be using the wrong user name or password.
Try a simple SQL statement. For example:
SQL> SELECT table_name FROM tables;
The isql tool returns the results of your SQL statement.
Note
If you have not set the ErrorMessagesPath in the additional driver configuration settings, any errors during testing will trigger a missing error message file ("The error message NoSQLGetPrivateProfileString could not be found in the en-US locale"). See ODBC driver settings for more information.
2 - Creating an ODBC DSN for windows clients
To create a DSN for Microsoft Windows clients, you must perform the following tasks:.
To create a DSN for Microsoft Windows clients, you must perform the following tasks:
2.1 - Setting up an ODBC DSN
A Data Source Name (DSN) is the ODBC logical name for the drive and other information the database needs to access data.
A Data Source Name (DSN) is the ODBC logical name for the drive and other information the database needs to access data. The name is used by Internet Information Services (IIS) for a connection to an ODBC data source.
This section describes how to use the Vertica ODBC Driver to set up an ODBC DSN. This topic assumes that the driver is already installed, as described in Installing Client Drivers on Windows.
To set up a DSN
Open the ODBC Administrator. For example, you could navigate to Start > Control Panel > Administrative Tools > Data Sources (ODBC).
Note
The method you use to open the ODBC Administrator depends on your version of Windows. Differences between Windows versions and Start Menu customizations could require you to take a different action to open the ODBC Administrator.
Decide if you want all users on your client system to be able to access to the DSN for the Vertica database.
If you want all users to have access, then click the System DSN tab.
Otherwise, click the User DSN tab to create a DSN that is only usable by your Windows user account.
Click Add to create a new DSN to connect to the Vertica database.
Scroll through the list of drivers in the Create a New Data Source dialog box to locate the Vertica driver. Select the driver, and then click Finish.
Note
If you have installed more than one version of the Vertica client drivers on your Windows client system, you may see multiple versions of the driver in this list. Choose the version that you know is compatible with your client application and Vertica Analytic Database server. If you are unsure, use the latest version of the driver.
The Vertica ODBC DSN configuration dialog box appears.
Click the More >>> button to view a description of the field you are editing and the connection string defined by the DSN.
Enter the information for your DSN. The following fields are required:
DSN Name — The name for the DSN. Clients use this name to identify the DSN to which they want to connect. The DSN name must satisfy the following requirements:
Its maximum length is 32 characters.
It is composed of ASCII characters except for the following: { } , ; ? * = ! @ \
It contains no spaces.
Server — The host name or IP address of the Vertica server to which you want to connect. Use localhost, if Vertica is installed on the same machine.
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 PreferredAddressFamily option to force the connection to use either IPv4 or IPv6.
The PreferredAddressFamily option is available on the Client Settings tab.
Backup Servers — A comma-separated list of host names or IP addresses used to connect to if the server specified by the Server field is down. Optional.
Database —The name of the Vertica database.
User Name — The name of the user account to use when connecting to the database. If the application does not supply its own user name when connecting to the DSN, this account name is used to log into the database.
The rest of the fields are optional. See DSN Parameters for detailed information about the DSN parameters you can define.
If you want to test your connection:
Enter at least a valid DSN name, Server name, Database, and either User name or select Windows authentication.
If you have not selected Windows authentication, you can enter a password in the Password box. Alternately, you can select Password for missing password to have the driver prompt you for a password when connecting.
Caution
Passwords entered into the Password box are saved, in plaintext, to the Windows registry.
Click Test Connection.
When you have finished editing and testing the DSN, click OK. The Vertica ODBC DSN configuration window closes, and your new DSN is listed in the ODBC Data Source Administrator window.
Click OK to close the ODBC Data Source Administrator.
Setting up a 32-Bit DSN on 64-Bit versions of Microsoft windows
On 64-bit versions of Windows, the default ODBC Data Source Administrator creates and edits DSNs that are associated with the 64-bit Vertica ODBC library.
Attempting to use these 64-bit DSNs with a 32-bit client application results in an architecture mismatch error. Instead, you must create a specific 32-bit DSN for 32-bit clients by running the 32-bit ODBC Administrator usually located at:
c:\Windows\SysWOW64\odbcad32.exe
This administrator window edits a set of DSNs that are associated with the 32-bit ODBC library. You can then use your 32-bit client applications with the DSNs you create with this version of the ODBC administrator.
2.2 - Encrypting passwords on ODBC DSN
When you install an ODBC driver and create a Data Source Name (DSN) the DSN settings are stored in the registry, including the password.
When you install an ODBC driver and create a Data Source Name (DSN) the DSN settings are stored in the registry, including the password. Encrypting passwords on ODBC DSN applies only to Windows systems.
Encrypting passwords on an ODBC data source name (DSN) provides security against unauthorized database access. The password is not encrypted by default and is stored in plain-text.
Note
ODBC DSN passwords that were created in Vertica ≤8.0.x are not encrypted when you upgrade to a higher version, regardless of encryption settings.
Enable password encryption
Use the EncryptPassword parameter to enable or disable password encryption for an ODBC DSN:
Use Windows Registry editor to determine if password encryption is enabled based on the value of EncryptPassword. Depending on the type of DSN you installed, check the following:
For a user DSN: HKEY_CURRENT_USER > Software > ODBC > ODBC.INI > dsn name > isPasswordEncrypted=<1/0>
For a system DSN: HKEY_LOCAL_MACHINE > Software > ODBC > ODBC.INI > dsn name > isPasswordEncrypted=<1/0>
For each DSN, the value of the isPasswordEncrypted parameter indicates the status of the password encryption, where 1 indicates an encrypted password and 0 indicates an unencrypted password.
2.3 - Testing an ODBC DSN using Excel
You can use Microsoft Excel to verify that an application can connect to an ODBC data source or other ODBC application.
You can use Microsoft Excel to verify that an application can connect to an ODBC data source or other ODBC application.
Open Microsoft Excel, and select Data > Get External Data > From Other Sources > From Microsoft Query.
When the Choose Data Source dialog box opens:
Select New Data Source, and click OK.
Enter the name of the data source.
Select the Vertica driver.
Click Connect.
When the Vertica Connection Dialog box opens, enter the connection information for the DSN, and click OK.
Click OK on the Create New Data Source dialog box to return to the Choose Data Source dialog box.
Select VMart_Schema*, and verify that the Use the Query Wizard check box is deselected. Click OK.
When the Add Tables dialog box opens, click Close.
When the Microsoft Query window opens, click the SQL button.
In the SQL window, write any simple query to test your connection. For example:
SELECT DISTINCT calendar_year FROM date_dimension;
* If you see the caution, "SQL Query can't be represented graphically. Continue anyway?" click **OK**. * The data values 2003, 2004, 2005, 2006, 2007 indicate that you successfully connected to and ran a query through ODBC.
Select File > Return Data to Microsoft Office Excel.
In the Import Data dialog box, click OK.
The data is now available for use in an Excel worksheet.
3 - Creating an ODBC DSN for macOS clients
You can use the Vertica ODBC Driver to set up an ODBC DSN.
You can use the Vertica ODBC Driver to set up an ODBC DSN. This procedure assumes that the driver is already installed, as described in Installing the ODBC client driver.
Locate and open the ODBC Administrator Tool after installation:
Navigate to Finder > Applications > Utilities.
Open the ODBC Administrator Tool.
Click the Drivers tab, and verify that the Vertica driver is installed.
Specify if you want all users on your client system to be able to access the DSN for the Vertica database:
If you want all users to have access, then click the System DSN tab.
Otherwise, click the User DSN tab to create a DSN that is only usable by your Macintosh user account.
Click Add... to create a new DSN to connect to the Vertica database.
Scroll through the list of drivers in the Choose A Driver dialog box to locate the Vertica driver. Select the driver, and then click OK. A dialog box opens that requests DSN parameter information.
In the dialog box, enter the Data Source Name (DSN) and an optional Description. To do so, click Add to insert keywords (parameters) and values that define the settings needed to connect to your database, including database name, server host, database user name (such as dbadamin), database password, and port. Then, click OK.
In the ODBC Administrator dialog box, click Apply.
After configuring the ODBC Administrator Tool, you may need to configure additional driver settings before you can use your DSN, depending on your environment. See Additional ODBC Driver Configuration Settings for details.
The standard iODBC Driver Manager on OS X includes a utility named iodbctest that lets you test a DSN to verify that it is correctly configured.
The standard iODBC Driver Manager on OS X includes a utility named iodbctest that lets you test a DSN to verify that it is correctly configured. You pass this command a connection string in the same format that you would use to open an ODBC database connection. After configuring your DSN connection, you can run a query to verify that the connection works.
For example:
# iodbctest "DSN=VerticaDSN;UID=dbadmin;PWD=password"
iODBC Demonstration program
This program shows an interactive SQL processor
Driver Manager: 03.52.0607.1008
Driver: 07.01.0200 (verticaodbcw.so)
SQL> SELECT table_name FROM tables;
table_name
--------------------------------------------------------------------------------------------------------------------------------
customer_dimension
product_dimension
promotion_dimension
date_dimension
vendor_dimension
employee_dimension
shipping_dimension
warehouse_dimension
inventory_fact
store_dimension
store_sales_fact
store_orders_fact
online_page_dimension
call_center_dimension
online_sales_fact
numbers
result set 1 returned 16 rows.
4 - ODBC DSN connection properties
The following tables list the connection properties you can set in the DSNs for use with Vertica's ODBC driver.
The following tables list the connection properties you can set in the DSNs for use with Vertica's ODBC driver. To set these parameters, see Setting DSN connection properties.
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 PreferredAddressFamily option to force the connection to use either IPv4 or IPv6.
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:
ipv4: Connect to the server using IPv4.
ipv6: Connect to the server using IPv6.
none: Use the IP address provided by the DNS server.
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 (;) is a reserved symbol. To set multiple properties as part of ConnSettings properties, use %3B as the comma delimiter, and + (plus) for spaces.
ConnectionTimeout
The number of seconds to wait for a request to complete before returning to the client application. This is equivalent to the SQL_ATTR_CONNECTION_TIMEOUT parameter in the ODBC API.
Default: 0 (no timeout)
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:
NONE: No conversion in either direction. This results in the highest performance.
INPUT: Strings sent from the client to the server are converted, but strings sent from the server to the client are not.
OUTPUT: Strings sent by the server to the client are converted, but strings sent from the client to the server are not.
BOTH: Strings are converted in both directions.
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:en_US@collation=binary
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:
The name of the workload for the session. For details, see Workload routing.
Default: None (no workload)
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 properties
The following connection properties pertain to OAuth in ODBC.
Caution
The unixODBC driver manager supports parameter values of up to 1000 characters in odbc.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.
Either OAuthAccessToken or OAuthRefreshToken must be set (programmatically or manually) to authenticate to Vertica with OAuth authentication.
You can omit both OAuthAccessToken and OAuthRefreshToken only if you authenticate to your identity provider directly with single sign-on through the client driver, which requires the machine running the ODBC driver to have access to a web browser.
For details on the different methods for retrieving access tokens, see Retrieving access tokens.
OAuthRefreshToken
Deprecated
Use OAuthAccessToken instead. Token refresh should be handled by the client application separately.
Required if OAuthAccessToken is unspecified, a token that used to obtain a new access token when their old one expires.
Either OAuthAccessToken or OAuthRefreshToken must be set (programmatically or manually) to authenticate to Vertica with OAuth authentication.
You can omit both OAuthAccessToken and OAuthRefreshToken only if you authenticate to your identity provider directly with single sign-on through the client driver, which requires the machine running the ODBC driver to have access to a web browser.
For details on the different methods for retrieving access tokens, see Retrieving access tokens.
If you set this parameter, you must also set the OAuthClientSecret connection property.
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.
OAuthClientSecret
Deprecated
Use OAuthAccessToken instead. Token refresh should be handled by the client application separately.
The secret provided by your identity provider for your client. This parameter is required for confidential clients.
Encryption
Property
Description
Standard/ Vertica
SSLMode
Controls whether the connection to the database uses SSL encryption, one of the following. For information on using these parameters to configure TLS, see Configuring TLS for ODBC Clients:
require: Requires that the server use TLS. If the TLS connection attempt fails, the client rejects the connection.
prefer: Prefers that the server use TLS. The client first attempts to connect using TLS. If that attempt fails, the client attempts to connect again in plaintext.
verify-ca: The client verifies that the server's certificate was issued by a trusted certificate authority (CA).
verify-full: The client verifies that the following conditions are met:
The server's certificate was issued by a trusted CA.
One of the following:
The server's hostname matches the common name specified in the server's certificate.
The server's hostname or IP address appears in the Subject Alternative Name (SAN) field of the server's certificate.
disable: Never connect to the server using TLS. This setting is typically used for troubleshooting.
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
Property
Description
Default
Standard/ Vertica
ColumnsAsChar
Specifies how character column types are reported when the driver is in Unicode mode. When set to false, the ODBC driver reports the data type of character columns as WCHAR. If you set ColumnsAsChar to true, the driver identifies character column as CHAR.
You typically use this setting for compatibility with some third-party clients.
Default: false
false
Vertica
ThreePartNaming
A Boolean value that controls how catalog names are interpreted by the driver. When this value is false, the driver reports that catalog names are not supported. When catalog names are not supported, they cannot be used as a filter in database metadata API calls. In this case, the driver returns NULL as the catalog name in all driver metadata results.
When this value is true, catalog names can be used as a filter in database metadata API calls. In this case, the driver returns the database name as the catalog name in metadata results. Some third-party applications assume a certain catalog behavior and do not work properly with the default values. Enable this option if your client software expects to get the catalog name from the database metadata and use it as part of a three-part name reference.
Default: false for UNIX, true for Windows
false (UNIX)
true (Window)
Vertica
EnforceBatchInsertNullConstraints
Prevents NULL values from being loaded into columns with a NOT NULL constraint during batch inserts. When this value is set to true, batch inserts roll back when NULL values are inserted in to columns with NOT NULL constraints. When this value is set to false, batch insert behavior is unchanged.
Vertica recommends only using this property with SAP Data Services as it could negatively impact database performance.
false
Vertica
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: vertichost@EXAMPLE.COM
Default: vertica
Vertica
KerberosHostname
Provides the instance or host name portion of the Vertica Kerberos principal; for example: verticaosEXAMPLE.COM
Default: Value specified in the servername connection string property
The properties in the following tables are common for all user and system DSN entries.
The properties in the following tables are common for all user and system DSN entries. The examples provided are for Windows clients.
To edit DSN properties:
On UNIX and Linux client platforms, you can edit the odbc.ini file. The location of this file is specific to the driver manager. See Creating an ODBC DSN for Linux.
You can also edit the DSN properties directly by opening the DSN entry in the Windows registry (for example, at HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\DSNname). Directly editing the registry can be risky, so you should only use this method for properties that cannot be set through the ODBC driver's user interface, or via your client code.
You can set properties in the connection string when opening a connection using the SQLDriverConnect() function:
In the connection string ';' is a reserved symbol. If you need to set multiple properties as part of the ConnSettings property use '%3B' in place of ';'. Also use '+' instead of spaces.
Your client code can retrieve DSN property values after a connection has been made to Vertica using the SQLGetConnectAttr() and SQLGetStmtAttr() API calls. Some properties can be set and using SQLSetConnectAttr() and SQLSetStmtAttr().