driver

The driver global parameter is a string that sets the 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. However, you can also specify a custom database driver in the driver parameter.

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

Syntax

For more information, see Working with Command Parameters. You can set this parameter in the following ways:

Option Syntax
Liquibase properties file
liquibase.driver: <string>
Global CLI parameter
liquibase
 --driver=<string> diff
 --changelog-file=mychangelog.xml

JVM system property

JAVA_OPTS Environment Variable

macOS/Linux:
JAVA_OPTS=-Dliquibase.driver=<string>
Windows:
set JAVA_OPTS=-Dliquibase.driver=<string>
Liquibase Environment Variables macOS/Linux:
LIQUIBASE_DRIVER=<string>
Windows:
set LIQUIBASE_DRIVER=<string>

Note: These commands only apply to the current shell. To set permanent environment variables, see Liquibase Environment Variables.

Related links