How do I verify that I've upgraded my Amazon Redshift JDBC or ODBC driver?

4 minute read
0

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?

Resolution

To avoid running into any issues found in the old driver versions, it's a best practice to use the latest Amazon Redshift drivers. 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 involves changes to only the client-side SQL data or application that's trying to connect to Amazon Redshift. This means that you don't need to make any changes to your Amazon Redshift cluster.

JDBC upgrades

To upgrade your JDBC driver in Amazon Redshift, do the following:

1.    Verify the current JDBC driver version by running the following command:

SELECT DISTINCT trim(remotehost) remote_host,trim(driver_version) jdbc_version,
MAX(recordtime) OVER (PARTITION BY driver_version) last_time_loggedin
FROM stl_connection_log
WHERE driver_version 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.

3.    Download the Amazon Redshift JDBC driver.

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-1.2.34.1058.jar indicates that you should use the JDBC 4.2 compatible driver without an AWS SDK, and that the driver version is 1.2.34.1058. You can authenticate to Amazon Redshift using IAM credentials and JDBC. If you need the AWS SDK, then download a JDBC driver that includes AWS SDK for Java, or download the AWS SDK separately.

5.    (Optional) If you're using SQL Workbench/J, select the existing 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.

ODBC upgrades

To upgrade your Amazon Redshift ODBC driver, do the following:

1.    Confirm which platform (Microsoft 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:

Microsoft 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

-or-

rpm -qa | grep AmazonRedshiftODBC

Gradual driver updates

To gradually update your JDBC or ODBC driver, do the following:

  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 three to five 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 three to five 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.

Additional troubleshooting

If you experience any issues during your upgrade, try the following:


AWS OFFICIAL
AWS OFFICIALUpdated a year ago