The updateToTagSQL command is a helper command that inspects the SQL Liquibase will run while using the updateToTag command.


The updateToTagSQL command is used to inspect the raw SQL before running the updateToTag 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 updateToTagSQL command

To run the updateToTagSQL command, you can specify the driver, classpath, and URL in your liquibase.properties file. You can also specify these in your command line.

Then run the updateToTagSQL command:

liquibase --changeLogFile=communityOnly.xml updateToTagSQL myTag

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

updateToTagSQL global attributes




--changeLogFile *

Specifies the root changelog



Specifies the JDBC database connection URL



Specifies the database username



Specifies the database password


--outputFile **

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


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

** If not specified, the updateToTag SQL output goes to STDOUT.

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

updateToTagSQL command attributes

Attribute Definition Requirement


The tag you can add to changesets to determine which changesets in the changelog to evaluate based on their tags.