Parallel Server   «Prev  Next»

Controlling Job Execution - Exercise

Controlling job execution with Instance Affinity

Run DBMS_JOB package

Objective: Execute DBMS_JOB in SQL*Plus to run job execution controls.

Exercise scoring

This exercise is worth a maximum of 5 points. After you complete the simulation, you will submit answers about the simulation to a tutor.

Exercise instructions

This exercise uses a Java applet to simulate an Oracle8i environment. If you do not have Java active in your browser or are behind a firewall that does not allow Java applets, you will not be able to complete this exercise. If you do not see the applet below, click the OK, I'm Done button to continue with the course.


In this exercise, you will learn to work with the DBMS_JOB package. You will submit a job, view it in the job queue, and then remove the job.


In the following simulation exercise, you are asked to perform a task or set of tasks you have learned in the previous lesson. The instructions will tell you what you need to do at each step, but will not tell you exactly how to do it.

Submitting your exercise

Once you have completed the simulation, type your answers to the final questions in the text boxes at the end of the simulation. Click the Submit button when finished to submit your answers to a tutor. Remember to submit all of your answers at once.
  1. Submit a job to the job queue. We have started the PL/SQL block that submits the job. You must type in the next line, which starts the command to submit the job. The syntax is: packagename.procedurename( Type in the command and press Enter.
  2. Type DBMS_JOB.SUBMIT( after the 5 prompt and press Enter
  3. Type the job parameter now. Use this syntax for all the parameters you are asked to enter: parametername=>value, Type in the line and press Enter.
  4. Type job=>JOBNO, after the 6 prompt and press Enter.
  5. Include the what parameter now. You are going to call the LOGENTRY procedure and specify the date June 21, 2000 as its parameter. Remember to place two single quotes on either side of the date and to use the standard Oracle date format. The format of this line is: what=>'procedurename(''parametervalue'');', Type in the line and press Enter.
  6. what=>'LOGENTRY(''21-JUN-00'');
  7. Type what=>'LOGENTRY(''21-JUN-00'');', after the 7 prompt and press Enter.
Now answer this:
Please answer the following question in the text box below to submit your answers.
List two examples of how you, as the DBA, might use the DBMS_JOB package.