Amazon Redshift drivers

How to Download, Install, Configure Amazon Redshift JDBC,ODBC Drivers?

This post will cover how to configure JDBC and ODBC connections to connect to your cluster from SQL client tools. This Post describes how to set up JDBC and ODBC connections. 

Amazon Redshift JDBC Driver

Download the Amazon Redshift JDBC driver

You can download the Amazon Redshift JDBC driver by multiple ways

  1. Option#1 – Download from AWS location – https://s3.amazonaws.com/redshift-downloads/drivers/jdbc/2.1.0.3/redshift-jdbc42-2.1.0.3.zip
  2. Option#2 – Login to AWS Console, Go to ‘Amazon Redshift’ , Click on ‘Clusters’ Dashboard. Select the Driver of your choice as shown below
Amazon Redshift JDBC Driver
Install, Setup, Configure the Amazon Redshift JDBC Driver

For this post, we utilized the SQL Workbench Client tool to Install, setup & Configure JDBC connection to Amazon Redshift.

  1. Install the latest version of SQL Workbench available at – https://www.sql-workbench.eu/downloads.html . In this page , click on “Generic package for all systems including all optional libraries (sha1)” to download and install the SQL workbench.
  2. Open SQL Workbench/J. Choose Create a new connection profile.In the New profile box, type a name for the profile. For example, ‘redshift jdbc’.
  3. Choose Manage Drivers. The Manage Drivers dialog opens. Choose ‘Amazon Redshift’ and choose the JAR file you downloaded (select jdbc42 jar file)
Redshift JDBC Driver Setup
  1. Connect to your cluster . For this , you need the JDBC URL which can be found in your Amazon Redshift – Clusters Dashboard in AWS console . Sample JDBC URL “jdbc:redshift://redshift-test.xxxxxxxxx.us-east-1.redshift.amazonaws.com:5439/testdb”
Amazon Redshift JDBC URL
  1. Configure to your cluster as shown below. Provide the URL identified above, user credentials (these are Redshift local users). Check ‘Auto commit’ checkbox.
Amazon Redshift JDBC Configuration

Amazon Redshift ODBC Driver

Download the Amazon Redshift ODBC driver

You can download the Amazon Redshift ODBC driver by multiple ways

Amazon Redshift ODBC driver
Install, Setup, Configure the Amazon Redshift ODBC Driver
  1. Open and Install the ODBC driver downloaded. For this , used 64 bit driver “AmazonRedshiftODBC64-1.4.45.1000”. Setup is simple and installed as shown below
Amazon Redshift ODBC Driver Setup
  1. Open the ODBC 64 bit driver and ‘Run as administrator’
  1. Connect to your cluster . For this , you need the ODBC URL which can be found in your Amazon Redshift – Clusters Dashboard in AWS console. Sample ODBC URL “Driver={Amazon Redshift (x64)}; Server=redshift-test.xxxxxxxxx.us-east-1.redshift.amazonaws.com; Database=testdb”
Amazon Redshift ODBC URL
  1. Configure the ODBC Connection as shown below. Select ‘System DSN’. Provide the Server, Port, Database details as identified in ODBC URL in previous steps. Provide user credentials (these are Redshift local users)
Amazon Redshift ODBC Configuration