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
- 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
- Option#2 – Login to AWS Console, Go to ‘Amazon Redshift’ , Click on ‘Clusters’ Dashboard. Select the Driver of your choice as shown below
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.
- 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.
- 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’.
- Choose Manage Drivers. The Manage Drivers dialog opens. Choose ‘Amazon Redshift’ and choose the JAR file you downloaded (select jdbc42 jar file)
- 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”
- 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 ODBC Driver
Download the Amazon Redshift ODBC driver
You can download the Amazon Redshift ODBC driver by multiple ways
- Option#1
- 64 bit driver – Download from AWS location – https://s3.cn-north-1.amazonaws.com.cn/redshift-downloads-cn/drivers/odbc/1.4.45.1000/AmazonRedshiftODBC64-1.4.45.1000.msi
- 32 bit driver – Download from AWS location – https://s3.amazonaws.com/redshift-downloads/drivers/odbc/1.4.45.1000/AmazonRedshiftODBC64-1.4.45.1000.msi
- Option#2 – Login to AWS Console, Go to ‘Amazon Redshift’ , Click on ‘Clusters’ Dashboard. Select the Driver of your choice as shown below
Install, Setup, Configure the Amazon Redshift ODBC Driver
- 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
- Open the ODBC 64 bit driver and ‘Run as administrator’
- 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”
- 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)