release-locks removes the specific Liquibase lock record from the DATABASECHANGELOGLOCK table in the needed database.
release-locks is typically used when there is an interruption with the Liquibase process during deployment resulting from the DATABASECHANGELOGLOCK table being in a locked state.
To run the
release-locks command, specify the driver, classpath, and URL in the Liquibase properties file. You can also specify these properties in your command line.
Then run the
liquibase --changelog-file=mainchangelog.xml release-locks
Note: Enter the name of the changelog you want to use in place of
mainchangelog.xml. You can also add the
changelog-file to the properties file.
release-locks global attributes
||The root changelog||Required|
||The database username||Required|
||The database password||Required|
||The JDBC database connection||Required|
password attributes are not required for connections and systems which use alternate means of authentication.
When successful, the
release-locks command produces the following output:
Liquibase Community 4.9.1 by Liquibase Successfully released all database change log locks for 'DBUSER@jdbc:h2:tcp://localhost:9090/mem:dev' Liquibase command 'release-locks' was executed successfully.