Disable Autocommit for DDL statements
I need some help with a database script I want to provide to some of my constituents that issues multiple Oracle DDL statements. I need these DDL statements to be treated as a single transaction such that if one of them fails it will automatically rollback the changes to the state prior to running the script. The problem I am facing is all Oracle DDL statements are autocommited treating each DDL statement as a single transaction.
I have heard there is a tool called Flashback that might allow rollback, but as I understand it this is an option and not available on all Oracle installations. So, this is not a practical option for me.
What I need is to be able to disable Oracle’s autocommit facility while running the DDL statements, but I don’t see a way to do this.
Is there a way to combine multiple Oracle DDL statements into a single script such that they are treated as a single transaction and can be rolled back?
Appreciate any advice!