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.
Job Test 1
1) Job Test 1

Job Test 2
2) Job Test 2

Job Test 3
3) Job Test 3

Job Test 4
4) Job Test 4

Job Test 5
5) Job Test 5

Job Test 6
6) Job Test 6

Job Test 7
7) Job Test 7

Job Test 8
8) Job Test 8

Job Test 9
9) Job Test 9

Job Test 10
10) Job Test 10

Job Test 11
11) Job Test 11

  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.
  1. Put in the instance parameter now. Specify that this job should run on instance 2. Type in the line and press Enter.
  2. Invalid entry
  3. instance=>2
  4. Type instance=>2, after the 8 prompt and press Enter.
  1. Add the force parameter now. Specify that this job is forced to run on instance 2. This is the final parameter, so instead of a comma, finish the line with a closing parenthesis and a semi-colon. Type in the line and press Enter.
  2. Invalid entry
  3. Type force=>TRUE); after the 9 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.