User guide

The following is an example connection string for SQL Workbench/J:
jdbc:redshift://examplecluster.abc123xyz789.us-west-2.redshift.amazon
aws.com:5439/dev?ssl=true&sslfactory=com.amazon.redshift.ssl.NonValidatingFactory
For more information about JDBC connections, see Obtain the JDBC URL (p. 140).
In Java code you can specify the connection string as follows:
Connection conn = null;
Properties props = new Properties();
props.setProperty("ssl", "true");
props.setProperty("sslfactory", "com.amazon.redshift.ssl.NonValidatingFactory");
conn = DriverManager.getConnection(<jdbc-connection-string>, props);
Connecting to Clusters From Client Tools and
Code
This section provides some options for third-party tools to connect to the cluster if you do not already
have a business intelligence tool to do so. Additionally, it describes how to connect to your cluster
programmatically.
Topics
Connect to Your Cluster by Using SQL Workbench/J (p. 162)
Connect to Your Cluster by Using the psql Tool (p. 166)
Connect to Your Cluster Programmatically (p. 169)
Connect to Your Cluster by Using SQL Workbench/J
Amazon Redshift does not provide or install any SQL client tools or libraries, so you must install any that
you want to use with your clusters. If you already have a business intelligence application or any other
application that can connect to your clusters using a standard PostgreSQL JDBC or ODBC driver, then
you can skip this section. If you don't already have an application that can connect to your cluster, this
section presents one option for doing so using SQL Workbench/J, a free, DBMS-independent,
cross-platform SQL query tool.
Topics
Install SQL Workbench/J (p. 162)
Connect to Your Cluster over a JDBC Connection in SQL Workbench/J (p. 163)
Test the SQL Workbench/J Connection (p. 165)
Install SQL Workbench/J
The Amazon Redshift Getting Started uses SQL Workbench/J. In this section, we explain in detail how
to connect to your cluster by using SQL Workbench/J.
To install SQL Workbench/J
1. Go to the SQL Workbench/J website and download the appropriate package for your operating
system on your client computer or Amazon EC2 instance.
API Version 2012-12-01
162
Amazon Redshift Management Guide
Connecting to Clusters From Client Tools and Code