Quick Start: Progress® DataDirect® for JDBC for

Amazon Redshift Driver

The following information enables you to connect with and test your driver immediately after installation. For installation instructions, refer to the Installation Guide. This Quick Start covers the following topics:

Connecting to a Database

Testing the Connection

Tuning the Driver for Optimal Performance

Connecting to a Database

Once the driver is installed, you can connect from your application to your data store in two ways: using the JDBC Driver Manager or using a JNDI data source. The following section provides information you need to get started using the drivers with the Driver Manager. For information on using data sources, refer to the User's Guide.

Environment Setup

Set your system CLASSPATH to include the following entry:

Note: The dependent jar files that are installed in the install_dir/lib folder with the redshift.jar must remain in the same directory as the redshift.jar file for the driver to be able to find them without explicitly adding them to the class path.
Windows Example
CLASSPATH=.;c:\program files\progress\datadirect\jdbc_51\lib\redshift.jar
UNIX/Linux Example

Driver Manager

To establish a database connection using the Driver Manager, your application must register the class name of the JDBC driver with the Driver Manager using the Class.forName() method and specifying the driver class name as the argument. The application must then invoke the DriverManager.getConnection() method supplying a connection URL.

IMPORTANT: If using Java SE 6 or higher as a JVM, you do not need to register the driver and can skip this step. Java SE 6 and higher automatically registers the driver with the JDBC Driver Manager.

The classname and connection URL syntax for the Amazon Redshift driver are:


Driver Classname:


Connection URL:




For example, a connection URL might take the following form:



Refer to the User's Guide for a complete description of the connection URL syntax and descriptions of the connection properties that can be specified.



// Register the driver with the driver manager.
// If using Java SE 6 or higher, you can omit this step. 
// Java SE 6 and higher automatically registers the driver. 
// Establish the Connection

String url = "jdbc:datadirect:redshift://<server>:<port>;

Connection con = DriverManager.getConnection(url, "test04", "test04");
// Verify the Connection
DatabaseMetaData metaData = con.getMetaData();
System.out.println("Database Name: " + metaData.getDatabaseProductName());
System.out.println("Database Version: " + 

Testing the Connection

DataDirect Test for JDBC is a Java software component developed by Progress DataDirect to test JDBC applications. Use the following steps to test your connection:

1.     Start DataDirect Test for JDBC by running testforjdbc.bat or testforjdbc.sh in the install_dir/testforjdbc directory, where install_dir is your installation directory.

2.     Click Press Here to Continue.

3.     From the Connection menu, select Connect to DB.

4.     Select the appropriate template for your data source, and specify the properties needed to connect. OK.

5.     A new connection window opens if the connection information was entered correctly. If the connection cannot be established, an error is displayed in the JDBC/Database Output window.

For more information about DataDirect Test for JDBC, refer to the User's Guide.

Tuning the Driver for Optimal Performance

The driver has connection properties that directly affect performance. To tune the driver for optimal performance, set the connection properties in the following table. Refer to the User's Guide if you need additional information.

If you are using SSL encryption


Determines whether data is encrypted and decrypted when transmitted over the network between the driver and database server.

If your application returns insensitive result set data


Determines the amount of memory used by the driver to cache insensitive result set data.

If your application is using statement pooling


Specifies the maximum number of pooled prepared statements for the connection. Setting this property to an integer greater than zero (0) enables the driver's internal prepared statement pooling, which is useful when the driver is not running from within an application server or another application that provides its own prepared statement pooling.

If you want your application to return table name information


Determines whether the driver returns table name information in the ResultSet metadata for Select statements.

If your application needs to handle Clobs


Enables CLOB functionality when handling character data. Determines whether columns of the Character varying data type will be described as VARCHAR or LONGVARCHAR (CLOB).

© 2015. Progress Software Corporation. All rights reserved.