Creating a system DSN entry for an ODBC connection
After you download and install the ODBC driver, add a data source name (DSN) entry to the client computer or Amazon EC2 instance. SQL client tools use this data source to connect to the Amazon Redshift database.
We recommend that you create a system DSN instead of a user DSN. Some applications load the data using a different user account. These applications might not be able to detect user DSNs that are created under another user account.
Note
For authentication using Amazon Identity and Access Management (IAM) credentials or identity provider (IdP) credentials, additional steps are required. For more information, see Step 5: Configure a JDBC or ODBC connection to use IAM credentials.
For information about how to create a system DSN entry, see the
Amazon Redshift ODBC connector installation and configuration guide
To create a system DSN entry for an ODBC connection on Windows
-
In the Start menu, open ODBC Data Sources.
Make sure that you choose the ODBC Data Source Administrator that has the same bitness as the client application that you are using to connect to Amazon Redshift.
-
In the ODBC Data Source Administrator, choose the Driver tab and locate the driver folder:
-
Amazon Redshift ODBC Driver (64-bit)
-
Amazon Redshift ODBC Driver (32-bit)
-
-
Choose the System DSN tab to configure the driver for all users on the computer, or the User DSN tab to configure the driver for your user account only.
-
Choose Add. The Create New Data Source window opens.
-
Choose the Amazon Redshift ODBC driver, and then choose Finish. The Amazon Redshift ODBC Driver DSN Setup window opens.
-
Under Connection Settings, enter the following information:
Data source name
Enter a name for the data source. You can use any name that you want to identify the data source later when you create the connection to the cluster. For example, if you followed the Amazon Redshift Getting Started Guide, you might type
exampleclusterdsn
to make it easy to remember the cluster that you associate with this DSN.Server
Specify the endpoint for your Amazon Redshift cluster. You can find this information in the Amazon Redshift console on the cluster's details page. For more information, see Configuring connections in Amazon Redshift.
Port
Enter the port number that the database uses. Use the port that the cluster was configured to use when it was launched or modified.
Database
Enter the name of the Amazon Redshift database. If you launched your cluster without specifying a database name, enter
. Otherwise, use the name that you chose during the launch process. If you followed the Amazon Redshift Getting Started Guide, enterdev
.dev
-
Under Authentication, specify the configuration options to configure standard or IAM authentication. For information about authentication options, see "Configuring Authentication on Windows" in Amazon Redshift ODBC Connector Installation and Configuration Guide.
-
Under SSL Settings, specify a value for the following:
SSL authentication
Choose a mode for handling Secure Sockets Layer (SSL). In a test environment, you might use
prefer
. However, for production environments and when secure data exchange is required, useverify-ca
orverify-full
. For more information about using SSL on Windows, see "Configuring SSL Verification on Windows" in Amazon Redshift ODBC Connector Installation and Configuration Guide. -
Under Additional Options, specify options on how to return query results to your SQL client tool or application. For more information, see "Configuring Additional Options on Windows" in Amazon Redshift ODBC Connector Installation and Configuration Guide.
-
In Logging Options, specify values for the logging option. For more information, see "Configuring Logging Options on Windows" in Amazon Redshift ODBC Connector Installation and Configuration Guide.
Then choose OK.
-
Under Data Type Options, specify values for data types. For more information, see "Configuring Data Type Options on Windows" in Amazon Redshift ODBC Connector Installation and Configuration Guide.
Then choose OK.
-
Choose Test. If the client computer can connect to the Amazon Redshift database, you see the following message: Connection successful.
If the client computer fails to connect to the database, you can troubleshoot possible issues. For more information, see Troubleshooting connection issues in Amazon Redshift.
-
Configure TCP keepalives on Windows to prevent connections from timing out. For information about how to configure TCP keepalives on Windows, see Amazon Redshift ODBC Connector Installation and Configuration Guide.
-
To help troubleshooting, configure logging. For information about how to configure logging on Windows, see Amazon Redshift ODBC Connector Installation and Configuration Guide.