releaseLocks removes the specific Liquibase lock record from the DATABASECHANGELOGLOCK table in the needed database.
releaseLocks is typically used when there was an interruption with the Liquibase process during deployment resulting from the DATABASECHANGELOGLOCK table being in a locked state.
To run the
releaseLocks command, you can specify the driver, classpath, and URL in your
liquibase.properties file. You can also specify these properties in your command line.
Then run the
liquibase -–changeLogFile=mainchangelog.xml releaseLocks
Note: Enter the name of the changelog you want to use in place of
mainchangelog.xml. You can also add the
changeLogFile to your
releaseLocks global attributes
||The root changelog||Required|
||The database username||Required|
||The database password||Required|
||The JDBC database connection||Required|
When successful, the
releaseLocks command produces the following output:
Liquibase Pro 3.9.0 by Datical licensed to Liquibase Pro Customer until Tue Sep 22 19:00:00 CDT 2020 Successfully released all database change log locks for 'HR_DEV@jdbc:oracle:thin:@support.datical.net:1521:ORCL' Liquibase command 'releaseLocks' was executed successfully.