0

I tried to implement Liquibase for my IBM DB2 zos database and when i run liquibase:generateChangeLog command, I'm getting the following error.

Error setting up or running Liquibase: liquibase.command.CommandExcecutionExceptoin: liquibase.exception.DatabaseException: Error executing SQL select CONSTRAINT_NAME, COLUMN_LIST as COLUMN_NAME, constraint_schema as CONSTRAINT_CONTAINER from information_schema.constraints where constraint_type='UNIQUE' and ........; DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=INFORMATION_SCHEMA.CONSTRAINTS, DRIVER=4.25.13

SQLCODE=-204, object not found, Basically the table/schema is not found.

When i ran the same command in debug mode, I could see that in the following class, https://github.com/liquibase/liquibase/blob/master/liquibase-core/src/main/java/liquibase/snapshot/jvm/UniqueConstraintSnapshotGenerator.java there is no logic to handle DB2z and hence it is considering no specific handler for RDBMS was provided and assuming INFORMATION_SCHEMA.

We do have logic for DB2Database, but not DB2ZDatabase.

Can anyone please help to resolve this ?

Note: The same liquibase implementation works fine for cockroach DB.

Dileepan
  • 123
  • 1
  • 4
  • 8

0 Answers0