I am trying to create a script that would be interactive that would be used to pormote objects from one data base to another. The o/s is Windows but I wanted to run the script from a sqlplus window.
The idea would be as each part of your promotion script completed you would be promted to continue, if you say no you exit the script
// Main script
prompt Creating roles Started
prompt Creating roles ended
-- create_roles.sql script is
-- Create the role
create role TEST_ROLE1;
create role TEST_ROLE2;
in this example I would want the main script to pause after each statement in the create_roles script. For example if there was an error like ORA-01921 after trying to create TEST_ROLE1 I could choose to ignore the failure and continue on, but if there was some other error I could choose to exit the promotion.
I would idealy like to be able to default to continue and only ask the question if there was an error. or have an over-ride that would just continue what ever the error.
This is all part of trying to establish a regular process to promote changes to the data-base.