Hands-on with chains
Let's get our hands dirty and play with chains for a while. The functionality of the programs we use in the chains is not important. What is important is that we can see what happens and why. We will use three programs that perform their own very important task: the first program for shutting down the database, the second program for copying the files, and the third program for starting the database after backing up.
All the three programs call dbms_lock.sleep
to enable us to study job logging and see how the chains we have created are run. This is enough for us to simulate the backup scenario we have seen before. In other words, for this example, dbms_lock.sleep
is used as a placeholder for the important tasks that the job may eventually run.
Programs
Programs are the building blocks of the chain (as well as a job, as mentioned in the previous chapter). We should start by creating programs that perform functions. For this part, we can work with the SHUTDOWN, COPYFILES
...