JDBC Driver for IBM Cloud Object Storage

Build 26.0.9655

Establishing a Connection

Creating a JDBC Data Source

You can create a JDBC data source to connect from your Java application, based on CData JDBC Driver for IBM Cloud Object Storage.

Follow these steps:

  1. Add the driver JAR file to the classpath. The JAR file is located in the installation directory's lib subfolder. Ensure that the .lic file is located in the same folder as the JAR file.
  2. Provide the driver class. For example:
    cdata.jdbc.ibmcloudobjectstorage.IBMCloudObjectStorageDriver
  3. Provide the JDBC URL. For example:
    jdbc:ibmcloudobjectstorage:ApiKey=myApiKey;CloudObjectStorageCRN=MyInstanceCRN;Region=myRegion;OAuthClientId=MyOAuthClientId;OAuthClientSecret=myOAuthClientSecret;

    Or, if there is a conflict in your application between drivers using the same URL format, use this form to ensure that you are using the CData driver:

    jdbc:cdata:ibmcloudobjectstorage:ApiKey=myApiKey;CloudObjectStorageCRN=MyInstanceCRN;Region=myRegion;OAuthClientId=MyOAuthClientId;OAuthClientSecret=myOAuthClientSecret;

    Ensure that the URL starts with either jdbc:ibmcloudobjectstorage: or jdbc:cdata:ibmcloudobjectstorage:. The URL can include any of the connection properties in name-value pairs separated with semicolons.

Connecting to IBM Cloud Object Storage

To connect to IBM Cloud Object Storage data, set these parameters:

  • InitiateOAuth: GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken.
  • ApiKey: The API key which was noted during setup (see Before You Connect).
  • CloudObjectStorageCRN (Optional): The cloud object storage CRN established during setup (see Before You Connect). The driver attempts to retrieve this automatically, but if you have more than one Cloud Object Storage account, we recommend that you specify this explicitly.

When you connect, the driver completes the OAuth process.

  1. Extracts the access token and authenticates requests.
  2. Saves OAuth values in OAuthSettingsLocation to be persisted across connections.

Copyright (c) 2026 CData Software, Inc. - All rights reserved.
Build 26.0.9655