How do I verify that I've upgraded my Amazon Redshift JDBC or ODBC driver?
Last updated: 2020-09-01
I'm trying to upgrade to the latest JDBC or ODBC driver to connect to my Amazon Redshift cluster. How can I do that and check that I've upgraded all my drivers?
It's a best practice to use the latest Amazon Redshift drivers to avoid running into any issues found in the old driver versions. Sometimes, AWS sends an email notifying customers about updating their drivers to the latest released version. A notification email is sent out when there are known issues or meaningful changes made to the latest Amazon Redshift driver.
Note: A driver upgrade only involves changes to the client-side SQL data or application that is trying to connect to Amazon Redshift. Therefore, you don't need to make any changes to your Amazon Redshift cluster.
To upgrade your JDBC driver in Amazon Redshift, perform the following steps:
1. Verify the current JDBC driver version being used:
SELECT DISTINCT trim(remotehost) remote_host,trim(application_name) jdbc_version, MAX(recordtime) OVER (PARTITION BY application_name) last_time_loggedin FROM stl_connection_log WHERE application_name LIKE '%JDBC%' AND trim(event) = 'set application_name' ORDER BY 2 DESC;
Note: Use the IP address in the output to identify the client machine.
2. Determine whether you need a 32-bit or 64-bit version.
4. Verify whether the driver contains the AWS SDK.
Note: The driver version number is indicated in the driver file name.
For example, RedshiftJDBC42-no-awssdk-188.8.131.528.jar indicates that you should use the JDBC 4.2 compatible driver without an AWS SDK, and that the driver version is 184.108.40.2068. You can authenticate to Amazon Redshift using IAM credentials and JDBC. If you need the AWS SDK, you must download a JDBC driver that includes AWS SDK for Java, or download the AWS SDK separately.
5. (Optional) If you are using SQL Workbench/J, select the exiting driver, and then remove it. Choose the folder icon and provide the download location of the latest driver. Then, choose OK. Your driver is now updated.
To upgrade your Amazon Redshift ODBC driver, perform the following steps:
1. Confirm which platform (Windows, macOS or Linux) that you want to upgrade.
2. Install and configure the ODBC connection.
3. Verify the ODBC driver version in use for your platform.
Windows: From the Start menu, navigate to ODBC Data Sources, and then choose the Drivers tab. Locate the Amazon Redshift ODBC Driver from the list of installed ODBC drivers. The version number appears in the Version column. Be sure to choose the ODBC Data Source Administrator that has the same bitness as the client application that's used to connect to Amazon Redshift.
macOS: At the terminal, run the pkgutil --info com.amazon.redshiftodbc command.
Linux: Depending on your package manager, run one of the following commands:
yum list | grep AmazonRedshiftODBC
rpm -qa | grep AmazonRedshiftODBC
Gradual driver updates
To gradually update your JDBC or ODBC driver, perform the following steps:
1. Replace the old driver with the new one. If an application explicitly points to an old driver file name, reconfigure the application, and then use the new driver for 3-5 days.
2. If there was no impact caused by the driver change, replace the additional SQL client. Check to see how the new client performs for 3-5 days and whether there was any impact on your Amazon Redshift cluster.
3. Continue to replace the driver gradually, until all the SQL clients are updated to the newer version.
If you experience any issues during your upgrade, try the following troubleshooting tips:
- Temporarily enable the driver level logging. For more information about enabling logging in drivers, see How do I enable logging in ODBC and JDBC drivers? on the Simba website.
- Revert to the previous driver version.