Liquibase crasht nach einspielen einer pks Datei

Hallo,

wenn ich versuche die dic.pks in meine oracle Datenbank einzuspielen stürzt liquibase bei dem folgenden changeset ab, auch wenn das darauffolgende changeset die dazugehörige pkb Datei ist.

Wenn ich dann versuche liquibase erneut laufen zu lassen kommt:
Waiting for changelog lock…

Das einzige was ich tun kann ist dann die pkb Datei manuell einzuspielen und das changeloglock manuell mit
UPDATE DATABASECHANGELOGLOCK SET LOCKED=0, LOCKGRANTED=null, LOCKEDBY=null where ID=1;
freizugeben

Ich hoffe jemand kann mir helfen

Vielen Dank
Dennis

Hi @Dennis - Welcome to the Liquibase Community!

I found this answer for you on StackOverflow: oracle11g - Liquibase not compilng oracle pkb/pks packges, - Stack Overflow

Please let me know if you have additional questions!

Kindly,
Tabby

Hello Tabby,

Sorry for not responding

the problem is that there are no errors in the packages. When I use my Sql Developer I first insert the pks and then the pkb file. This works fine. In liquibase it crashes after inserting the pks file. Is there a way that liquibase ignores the errors and compiles only after the pkb file?

Kindly,
Dennis

Hello @Dennis,

Can you give a more specific example of the package and package body statements that are failing a deployment?

Regards,
Tabby

Hello,

I have here the package that fails:

I found out that it works when I insert the pks with the pkb together in one changeset.
Is there nevertheless a way to do it in a seperated changesets?

Kindly,
Dennis

Hi @Dennis,

Shooting an arrow in the dark now, as the original post is not in English (I did try to learn German at one point while working for a DE client but no success, anyway, back to the question :smiley: ).

Can you do a quick check and see what this returns?

select * from DATABASECHANGELOGLOCK;

I have a “feeling” that the target DB is locked and this triggers those odd errors (this is kind of an “unexpected”, rare issue that happens when a previous Liquibase execution fails due to a fatal error - like a server crash, DB crash - whatever). So if this is true (DB is “locked” - in that table), you need to “manually” unlock it (can do that via a basic update of that table, flipping that locked flag to 0 and other columns to null or use the Liquibase built in command for this) and re-run the deploy.
More details here: database - Liquibase lock - reasons? - Stack Overflow
and here: release-locks | Liquibase Docs

Hope this helps,
Eduard

Hello EduardUta,

the databasechangelog is indeed locked (locked = 1).
When I try to unlock it with
UPDATE DATABASECHANGELOGLOCK SET LOCKED=0, LOCKGRANTED=null, LOCKEDBY=null where ID=1;

it returns this:

  1. 00000 - “trigger ‘%s.%s’ is invalid and failed re-validation”
    *Cause: A trigger was attempted to be retrieved for execution and was
    found to be invalid. This also means that compilation/authorization
    failed for the trigger.
    *Action: Options are to resolve the compilation/authorization errors,
    disable the trigger, or drop the trigger.

I can resolve this error when I insert the package body first and then update the databasechangeloglock.
What I want to know is if there is a way to insert the packages in only changeset. I dont want them to be in the same changeset.

Dennis

1 Like

Can you help me with this problem that I want them to be in different changesets?

Dennis

Sorry, @Dennis , have no idea on this, hopefully someone else could help here (having all the details now).

Regards,
Eduard