I have not yet coded a potential solution to this, so before anyone asks I have zero code to back this up as I am trying to get a firm grip on the processing behind what needs to happen.
My problem is that I have an Oracle database that will be firing off jobs constantly (every 10 minutes or so) and I need a safe way (security wise and data integrity wise), to terminate these jobs and prevent them from executing while a nightly back up takes place. For the sake of discussion this will be done via a cron job. The way I think it should work is that the cron job will fire off at a time of 1 am (or some other low usage time, by low I mean < .001% of the user base will be interacting with the system). The java process will need to execute some PL/SQL function on the database that does the following things:
1) A force terminate on all running jobs
2) A snapshot of data that is to be written to an arbitrary directory
3) Restart all jobs (mark them as enabled instead of disabled)
My question is this:
How can this be accomplished with the minimum amount of permissions and does this loose architecture facilitate the ability to prevent data corruption, assuming Oracle is correctly generating undo/redo logs? IF this is an insecure/poor way of doing this, any other suggestions are appreciated.