Tip: The following documentation describes the use of native executors for applications that rely on complex SQL which cannot easily be deployed over JDBC. This complex SQL needs to be deployed over a platform command-line tool.
Using Liquibase to track database changes in SQL, XML, JSON, or YAML changelogs is usually processed over traditional JDBC connections. However, there might be times when the JDBC connection (or executor) cannot process highly specialized SQL, and you might want to use a different executor. The changesetattribute
runWith="<executor>" lets you specify a non-default executor to run your SQL.
runWith="<executor>" capability works with the following changelogs:
- Formatted SQL changelogs.
- XML, JSON, and YAML changelogs that include inline SQL or
sqlFiletagged changesets. For more information, see sql and sqlFile.
- Liquibase Pro: XML, JSON, and YAML changelogs that use the modifyChangeSets Change Type with include or includeAll to import nested changelogs. This sets an overarching executor for multiple changelogs, with the option of overriding that default for specific changesets.
For Liquibase Pro users, PSQL, SQL Plus, and SQLCMD integrations are built in.
To create and use a custom executor other than the built-in integrations, you must:
- Create a class that extends the AbstractExecutor class
- Register your new class in
- Specify your executor's name using the
For more information, see the Liquibase Contributor Docs: Additional "runWith" Options.
Tip: All changelog and changeset attributes use the
||Default value if none specified. See Class JdbcExecutor.|
||Executor for PostgreSQL. See Use PSQL and runWith on PostgreSQL.|
||Executor for Oracle. See Use SQL Plus and runWith on Oracle and Use SQL Plus and Oracle Proxy User.|
||Executor for MSSQL Server. See Use SQLCMD and runWith on MSSQL Server.|
||Custom executor. See Additional "runWith" Options.|
liquibase.sqlcmd.conf files are the configuration files to pass arguments to your executor when running Liquibase Pro. In this file, you can specify key-value pairs for configuring the executor.