0

From what I see, having the RAISE_APPLICATION_ERROR cancels the other operations that I would have in the trigger. I tried writing first the INSERT and then the RAISE_APPLICATION_ERROR hoping that they get executed in the order in which they are read but it doesn't work like this...The error is thrown and the INSERT is canceled. How could I make both of the operations get executed (from the same trigger) ?
I also tried creating two triggers .. one of them doing the RAISE_APPLICATION_ERROR part and the other doing the INSERT and establishing the order using FOLLOWS and PRECEDES but it didn't work. The trigger should block the DROP DDL (that's what for I used the RAISE_APPLICATION_ERROR) and it also should do an insert in a LOG type table (that's what for I used the INSERT).

0

1 Answer 1

1

Log type operations are usually done via AUTONOMOUS_TRANSACTION procedures.

Don't have a logging package, get one from GitHub.

https://github.com/OraOpenSource/Logger

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.