User guide
ODBC Driver Configuration Options
You can use the configuration options described in the following table to control the behavior of the
Amazon Redshift ODBC driver.
In Windows, you typically set driver options when you configure a DSN.You can also set driver options
in the connection string when you connect programatically, or by adding or changing registry keys in
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\your_DSN. For more information about
configuring a DSN, see Install and Configure the Amazon Redshift ODBC Driver on Microsoft Windows
Operating Systems (p. 146). For an example of setting driver options in a connection string, see Connect
to Your Cluster Programmatically (p. 169).
In Linux and Mac OS X, you set driver configuration options in your odbc.ini and amazon.redshiftodbc.ini
files, as described in Configure the ODBC Driver on Linux and Mac OS X Operating Systems (p. 151).
Configuration options set in an amazon.redshiftodbc.ini file apply to all connections, whereas configuration
options set in an odbc.ini file are specific to a connection. Configuration options set in odbc.ini take
precedence over configuration options set in amazon.redshiftodbc.ini.
DescriptionDefault
Value
Matching
Postgr-
eSQL op-
tion ex-
ists?
ODBC Option
When this option is enabled (1), the driver exposes
Boolean values as data type SQL_VARCHAR with a
length of 5.
When this option is disabled (0), the driver exposes
Boolean values as data type SQL_BIT.
0YesBoolsAsChar
The name of the database to use when the connection
is established.
YesDatabase
The location of the Amazon Redshift ODBC driver
shared object file.
YesDriver
The number of rows that the driver returns when Use-
DeclareFetch is enabled.
100YesFetch
When this option is enabled (1), the driver uses TCP
keepalives to prevent connections from timing out.
When this option is disabled (0), the driver does not
use TCP keepalives.
1No. If
keepalives
are dis-
abled at the
TCP/IP
level,
KeepAlive-
Time and
KeepAli-
veInterval
are set to 0.
KeepAlive
The number of TCP keepalive packets that can be lost
before the connection is considered broken.
When this option is set to 0, the driver uses the TCP/IP
system default for this setting.
0NoKeepAliveCount
API Version 2012-12-01
155
Amazon Redshift Management Guide
Configuring Connections in Amazon Redshift