I have a Java Program that will import data from a DB2 table to an Oracle table.
The requirement that I have is the following -:
Step 1. Schedule the Java program to run everyday. This will import data to the Oracle table on a daily schedule.
Step 2. Schedule a seperate Oracle Stored Procedure that will run ONLY IF the Java Program imports the data into the Oracle table successfully.
To me the obvious way to go is to call the Oracle SP via the Java program depending on whether Step1 completes successfully. However, I have been given instruction not to do it this way for certain reasons.
My question is – Is it possible to schedule an Oracle SP to run only if a Java program executes without an exception? If so, please let me know how I can go about doing this.
Any help will be appreciated.
Thanks.
Since its already decided that the obvious way is not to be used, can you make some other call to DB that can update certain value? If that will be allowed, then you can use a trigger to call SP that you want to call.