Answer the question
In order to leave comments, you need to log in
How to make a multiroll patch?
Good afternoon.
Tell me what you can think of so that the database patches are multi-rolled?
Example:
I have three scripts in a patch. The first one makes a new table. The second fills this table with data. The third one makes some other changes to the database.
When installing a patch, I get an error in the third patch. I fix the bug and re-roll the patch. The patch, in theory, got up normally, but there are a lot of errors in the log that the table exists and that data with such a primary key already exists.
How to remove such errors. For example, data insertion can be converted into apserts, but what about scripts that change the structure of the database (creating tables, adding and deleting columns, creating indexes, etc.).
Perhaps there are some other approaches? Something like rolling back the entire patch, if at least one script has crashed, etc..
Answer the question
In order to leave comments, you need to log in
Unfortunately not.
https://docs.oracle.com/en/database/oracle/oracle-...
Yes, this is pain and crutches :( If you want to remove errors, then you need to write handler functions and provide for various scenarios.
As a last resort, there is only FLASHBACK DATABASE, but again, this is a pain - to roll back the entire database due to changes in one or two tables .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question