The update-to-tag-sql command is a helper command that inspects the SQL Liquibase will run while using the update-to-tag command.


The update-to-tag-sql command is used to inspect the raw SQL before running the update-to-tag command, so you can correct any issues that may arise before running the command. Liquibase uses the raw SQL to apply database changes you have added to the changelog file based on the tag specified.

Running the update-to-tag-sql command

To run the update-to-tag-sql command, specify the driver, classpath, and URL in the Liquibase properties file. You can also specify them from the command line.

Then run the update-to-tag-sql command:

liquibase --changelog-file=communityOnly.xml update-to-tag-sql myTag

Note: Enter the name of the changelog and the tag that you want to use in place of communityOnly.xml and myTag.

update-to-tag-sql global attributes

Tip: For best results, specify all commands and parameters in the --kebab-case format in the CLI. If your preference is camelCase, it also works in the CLI.

Attribute Definition Requirement
--changelog-file *

The root changelog


The JDBC database connection URL


The database username


The database password

--output-file **

Specifies the file path to where the SQL output will be written


*Liquibase checks the changelog and any nested changelogs for the definitions of the changesets to update.

** If not specified, the update-to-tag SQL output goes to STDOUT.

Note: The username and password attributes are not required for connections and systems which use alternate means of authentication.

update-to-tag-sql command attributes

Attribute Definition Requirement

The tag identifying which tagged changesets in the changelog to evaluate.