Liquibase update could not Identify already executed change sets

1.8k views Asked by At

I am trying to run liquibase update on oracle database in command line and it couldn't able to identify the already executed change sets and it tries to start update from the beginning of the change log file

java -jar liquibase.jar --driver=oracle.jdbc.driver.OracleDriver --classpath=ojdbc14-11.2.0.3.0.jar --changeLogFile=ParentDBChangeLog.xml  --url="jdbc:oracle:thin:@172.25.XX.XXX:1521:ora11g" --username=xxxx --password=xxxxx update

It is getting failed from the first change set which tries to execute and the error which I got is

Error: java.sql.SQLSyntaxErrorException: ORA-00955: name is already used by an existing object

How I can resolve this problem

1

There are 1 answers

0
SteveDonie On

You should check that the database still contains the DATABASECHANGELOG and DATABASECHANGELOGLOCK tables and that they are appropriately populated (DATABASECHANGELOG should have one row of data for each of the changesets that has been applied to the database, and the ID, AUTHOR, and FILENAME columns should match the values in your changelog.xml).

I have seen many instances of well-meaning DBAs seeing those tables, not recognizing what they are, and removing them. I have also seen instances where someone was starting to introduce Liquibase but not everyone knows about that, and continues to use whatever process is alrady being used to manage schema change, and that process removes or alters those tables.