driver

The --driver global parameter is a case-sensitive string that sets the JDBC driver for the target database you're using with Liquibase.

Uses

Each database has its own driver, such as oracle.jdbc.OracleDriver for an Oracle database. Liquibase automatically specifies the driver for most supported databases based on your database JDBC URL. If you want to use the standard driver for a database that Liquibase supports, you do not need to specify this parameter.

However, you can optionally specify a custom database JDBC driver class name in the --driver parameter. This may be useful if you need to use a non-default driver to access proprietary features from your database vendor.

Tip: You must place your JDBC driver JAR file in your $LIQUIBASE_HOME/lib folder and specify the exact name of the driver for Liquibase to recognize it. You can acquire driver JARs from your database vendor.

For more information on the parameters you need to specify to run Liquibase commands, see Create and Configure a liquibase.properties File.

Syntax

You can set this parameter in the following ways:

Option

Syntax

Liquibase properties file (defaults file)

liquibase.driver: <string>

Global flow file argument

globalArgs: { driver: "<string>" }

Global CLI parameter

liquibase --driver=<string> update --changelog-file=example-changelog.xml

JVM system property (JAVA_OPTS environment variable)

Unix:

JAVA_OPTS=-Dliquibase.driver=<string>

Windows:

JAVA_OPTS=-D"liquibase.driver"=<string>

Liquibase environment variable

LIQUIBASE_COMMAND_CHANGELOG_FILE=<string>