Connect Liquibase with Oracle Autonomous Database with ATP & ADW

Last updated: September 2, 2025

Oracle Autonomous Database is an Oracle Cloud product with services that deliver automated patching, upgrades, and tuning. It includes:

  • Autonomous Transaction Processing (ATP) – an Autonomous Database service that can instantly scale to meet the demands of mission-critical transaction processing and mixed workload applications.

  • Autonomous Data Warehouse (ADW) – a fully autonomous data warehousing environment that scales elastically, delivers fast query performance, and requires no database administration.

For more information, see the Oracle Cloud documentation page.

Verified database versions

19c

Before you begin

Procedure

1

Use Liquibase Package Mangager (LPM) to install your driver

Download notes

You can download ojdbc8.jar or ojdbc10.jar. The ojdbc10.jar file is certified with JDK10 and JDK11, and the ojdbc8.jar file is certified with JDK8, JDK9, and JDK11.

It is best practice to use the Oracle Database 18c (or higher) drivers. In addition to the Oracle JDBC driver, the following .jar files are required:

  • oraclepki.jar

  • osdt_cert.jar

  • osdt_core.jar

In the example code below, you will install each of these and JDK 10. If you need a different version of the driver, you can use oracle-ojdbc11 or oracle-ojdbc8.

liquibase lpm add oracle-ojdbc10
liquibase lpm add oracle-oraclepki
liquibase lpm add oracle-osdt_cert
liquibase lpm add oracle-osdt_core
2

Configure your connection

1. Log into your Oracle Cloud account.

2. Navigate to Autonomous Database and select DB Connection > Wallet Type > Download.

3. Enter a secure password for the Wallet and download the ZIP file to save the client security credentials.

4. Unzip the Wallet and place it somewhere safe in your file system to prevent unauthorized database access.

5. Navigate to the Wallet folder and update the ojdbc.properties file with the following:

  • Comment out the oracle.net.wallet_location line.

  • Set javax.net.ssl.trustStorePassword to the Wallet password that you entered to download the Wallet.

  • Set javax.net.ssl.keyStorePassword to the Wallet password that you entered to download the Wallet.

#oracle.net.wallet_location=(SOURCE=(METHOD=FILE)(METHOD_DATA=(DIRECTORY=${TNS_ADMIN}))) javax.net.ssl.trustStore=${TNS_ADMIN}/truststore.jks javax.net.ssl.trustStorePassword=my_wallet_password javax.net.ssl.keyStore=${TNS_ADMIN}/keystore.jks javax.net.ssl.keyStorePassword=my_wallet_password

6. In the Wallet folder, open the sqlnet.ora and ensure that SSL_SERVER_DN_MATCH=yes.

7. Specify the database URL in the liquibase.properties file (defaults file), along with other properties you want to set a default value for. Liquibase does not parse the URL. You can either specify the full database connection string or specify the URL using your database's standard connection format:

url: jdbc:oracle:thin:@<database_name>_high?TNS_ADMIN=/path/to/Wallet_<database_name>

Note: If you use Windows, ensure the TNS_ADMIN path to your wallet folder includes double slashes in the URL property.

Example: url: jdbc:oracle:thin:@databaseName_high?TNS_ADMIN=path//to//Wallet_databaseName

To apply a Liquibase Secure key to your project, add the following property to the Liquibase properties file: licenseKey: <paste code here>

3

Test your connection

1. Create a text file called changelog (.sql, .yaml, .json, or .xml) in your project directory and add a changeset.

If you already created a changelog using the init project command, you can use that instead of creating a new file. When adding onto an existing changelog, be sure to only add the changeset and to not duplicate the changelog header.

--liquibase formatted sql
--changeset your.name:1
CREATE TABLE test_table (
  test_id INT NOT NULL,
  test_column INT,
  PRIMARY KEY (test_id) NOT ENFORCED
)

2. Navigate to your project folder in the CLI and run the Liquibase status command to see whether the connection is successful:

liquibase status --username=test --password=test --changelog-file=<changelog.xml>

Note: You can specify arguments in the CLI or keep them in the Liquibase properties file.

If your connection is successful, you'll see a message like this:

4 changesets have not been applied to <your_connection_url> Liquibase command 'status' was executed successfully.

3. Inspect the deployment SQL with the update-sql command

liquibase update-sql --changelog-file=<changelog.xml>

If the SQL that Liquibase generates isn't what you expect, you should review your changelog file and make any necessary adjustments.

4. Then execute these changes to your database with the update command:

liquibase update --changelog-file=<changelog.xml>

If your update is successful, Liquibase runs each changeset and displays a summary message ending with:

Liquibase: Update has been successful. Liquibase command 'update' was executed successfully.

5. From a database UI tool, ensure that your database contains the test_table object you added along with the DATABASECHANGELOG table and DATABASECHANGELOGLOCK table.