The markNextChangeSetRanSQL command is a helper command that inspects the SQL Liquibase will run while using the markNextChangeSetRan command.


The markNextChangeSetRanSQL command is used to inspect the raw SQL before running the markNextChangeSetRan command, so you can correct any issues that may arise before running the command. Liquibase uses the raw SQL to mark the next changeset you apply as executed in your database and to keep that changeset in the changelog as a record assuming that it has already been deployed.

Running the markNextChangeSetRanSQL command

To run the markNextChangeSetRanSQL command, you can specify the driver, classpath, and URL in your file. For more information, see Creating and configuring a file. You can also specify these properties in your command line.

Then run the markNextChangeSetRanSQL command:

liquibase markNextChangeSetRanSQL

Note: Enter the name of the changelog that you want to use in place of markNextChangeSetRanSQL and include your database type in place of oracle if you use the .sql file format.

markNextChangeSetRanSQL global attributes





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 markNextChangeSetRan SQL will be written


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

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