Oracle9i Supplied PL/SQL Packages and Types Reference Release 1 (9.0.1) Part Number A89852-02 |
|
DBMS_JOB, 2 of 12
This procedure submits a new job. It chooses the job from the sequence sys
.jobseq
.
DBMS_JOB.SUBMIT ( job OUT BINARY_INTEGER, what IN VARCHAR2, next_date IN DATE DEFAULT sysdate, interval IN VARCHAR2 DEFAULT 'null', no_parse IN BOOLEAN DEFAULT FALSE, instance IN BINARY_INTEGER DEFAULT any_instance, force IN BOOLEAN DEFAULT FALSE);
The parameters instance
and force
are added for job queue affinity. Job queue affinity gives users the ability to indicate whether a particular instance or any instance can run a submitted job.
This submits a new job to the job queue. The job calls the procedure DBMS_DDL
.ANALYZE_OBJECT
to generate optimizer statistics for the table DQUON
.ACCOUNTS
. The statistics are based on a sample of half the rows of the ACCOUNTS
table. The job is run every 24 hours:
VARIABLE jobno number; BEGIN DBMS_JOB.SUBMIT(:jobno, 'dbms_ddl.analyze_object(''TABLE'', ''DQUON'', ''ACCOUNTS'', ''ESTIMATE'', NULL, 50);' SYSDATE, 'SYSDATE + 1'); commit; END; / Statement processed. print jobno JOBNO ---------- 14144
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|