Quick Start: Progress DataDirect® for ODBC for Amazon RedshiftTM Wire Protocol Driver on UNIX and Linux (32-bit and 64-bit)

The following basic information enables you to connect with and test your driver immediately after installation. For installation instructions, see the Progress DataDirect for ODBC Drivers Installation Guide. This Quick Start covers the following topics:

Environment Setup

Test Loading the Driver

Connecting to a Database

Testing the Connection

Tuning the Driver for Optimal Performance

ODBCHOME in the following sections refers to your installation directory path determined at installation.

Environment Setup

1       Check your permissions: Log in as a user with full r/w/x permissions recursively on the entire Progress DataDirect for ODBC Drivers installation directory.

2       Determine which shell you are running: From the login shell, execute the echo $SHELL command.

3       Run the DataDirect setup script to set variables: Two scripts, odbc.csh and odbc.sh, are installed in the installation directory. For Korn, Bourne, and equivalent shells, execute odbc.sh. For a C shell, execute odbc.csh. After running the setup script, execute the env command to verify that the ODBCHOME/lib directory has been added to your shared library path.

4       Set ODBCINI variable: Progress DataDirect for ODBC Drivers install a default odbc.ini file, where your data sources reside, in the installation directory. You must set the ODBCINI environment variable to point to the path of the odbc.ini file. For example:

$ ODBCINI= ODBCHOME/odbc.ini; export ODBCINI

Test Loading the Driver

The ivtestlib (32-bit drivers) and ddtestlib (64-bit drivers) test loading tools are provided to verify that the driver can be loaded into memory; they are located in the ODBCHOME/bin directory. For example, to load the 32-bit driver, you would enter:

$ ivtestlib ODBCHOME/lib/ivrsftnn.zz

where nn represents the driver level number and zz represents the extension.

If the load is successful, the test loading tool returns a success message along with the version string of the driver. If the driver cannot be loaded, test loading tool returns an error message explaining why.

Connecting to a Database

The following procedure is applicable to all UNIX/Linux systems.

Defining a Data Source in the odbc.ini

The default odbc.ini file installed in the installation directory is a template in which you create data source definitions. You enter your site-specific database connection information using a text editor. Each data source definition must include the keyword Driver=, which is the full path to the driver.

The following examples show the minimum connection string options that must be set to complete a test connection, where xx represents iv for 32-bit or dd for 64-bit drivers, nn represents the driver level number, and zz represents the extension. The values for the options are samples and are not necessarily the ones you would use.

To configure a connection, you might enter:

[Redshift Wire Protocol]
Driver=ODBCHOME/lib/xxrsftnn.zz
Database=Redshiftdb1

HostName=RedshiftServer
PortNumer=5439

Connection Options

Database: The name of the database to which you want to connect by default.

HostName: Either the URL name or the IP address of the server to which you want to connect.

PortNumber: The port number of the server listener. The default is 5439.

Testing the Connection

The Progress DataDirect for ODBC for Amazon Wire Protocol driver installation includes a program named example that can be used to connect to a data source and execute SQL. The application is located in the ODBCHOME/example directory. To run the program, type example and follow the prompts to enter your data source name, user name, and password. If successful, a SQL> prompt appears and you can type in SQL statements such as

SELECT * FROM accounts

If example is unable to connect, the appropriate error message appears.

Tuning the Driver for Optimal Performance

The drivers have connection options that directly affect performance. To tune these drivers for performance, set the following connection options:

If your application does not use threads

ApplicationUsingThreads=0

If you want to use DataDirect connection pooling

ConnectionPooling=1

If your application is configured for high availability that replays queries after a failure

Controlled by FailoverMode=. Although high availability that replays queries after a failure provides increased levels of protection, it can adversely affect performance because of increased overhead.

If your application requires encryption of data

Controlled by EncryptionMethod=. Data encryption may adversely affect performance because of the additional overhead (mainly CPU usage) required to encrypt and decrypt data.

© 2016. Progress Software Corporation. All rights reserved.

2/16, 7.1.6