Oracle7 Server Distributed Systems Volume II: Replicated Data

Contents Index Home Previous Next

Altering a Job

To alter a job that has been submitted to the job queue, use the procedures CHANGE, WHAT, NEXT_DATE, or INTERVAL in the DBMS_JOB package.

Restrictions

You can alter only jobs that you own. If you try to alter a job that you do not own, you receive a message that states the job is not in the job queue.

Attention: When you change a job's definition using the WHAT parameter in the procedure CHANGE or WHAT, Oracle records your current environment. This becomes the new environment for the job.

Altering a Job: Example

In the following example, the job identified by 14144 is now executed every three days. By specifying NULL for WHAT and NEXT_DATE, these values remain unchanged.

DBMS_JOB.CHANGE( job       => 14144, 
                 what      => null, 
                 next_date => null, 
                 interval  => 'SYSDATE + 3');

You could make this same change by calling the INTERVAL procedure, as shown in the following example:

DBMS_JOB.INTERVAL( job      => 14144,
                   interval => 'SYSDATE + 3');

Additional Information: The parameters for these procedures are described in the following tables:

CHANGE Table 12 - 31

WHAT Table 12 - 37

NEXT_DATE Table 12 - 33

INTERVAL Table 12 - 32


Contents Index Home Previous Next