Liquibase Command listLocks

Some times Liquibase is unable to execute the ChangeSet and update the database, because some other user or process has taken lock of the system that is preventing Liquibase from executing and applying changes to the database.

Liquibase provide a listLocks command which will read the DATABASECHANGELOGLOCK table and return a list of IP address , host name , and time stamp of the user or process who currently having the lock on the database.

liquibase.properties (update changeLog File file format with SQL, XML, YAML, JSON as per changelog.mysql.)

liquibase.command.url=jdbc:mysql://localhost:3306/appleDb?createDatabaseIfNotExist=true&autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true
liquibase.command.username= root
liquibase.command.password= rootroot

 execute the command

liquibase listLocks

follow us on