|
|
| |
 |
|
Automating Oracle
Oracle Tips by Mike Ault |
The DBMS_JOB Package
An example using the SUBMIT procedure would be:
VARIABLE
x NUMBER:
EXECUTE
DBMS_JOB.SUBMIT(:x,’BEGIN testit; END;’,SYSDATE,’SYSDATE+(15/1440)’);
In the first example, the job would be created
and assigned the job number 999. The advantage to this form of
submission is that it allows the Remote DBA to specify the job number so
that for future work with the specific job, the number is already
known. In the second example, the job receives a job number from an
internal queue which then requires either reading and recording the
“x” variable or looking at the Remote DBA_JOBS view to find the job number
for a specific “WHAT”.
To run a job immediately you use the
DBMS_JOB.RUN procedure specifying the job number for the specific
job. To remove a procedure you use the DBMS_JOB.REMOVE procedure
specifying the job number of the job to be removed. You cannot
remove a running job.
SEE CODE DEPOT FOR FULL SCRIPTS
 |
For more information on this topic, I recommend Don
Burleson's latest book "Oracle
Tuning: The Definitive Reference".
You can buy it direct from the publisher for 50%-off and get
instant access to the code depot of Oracle tuning scripts: |
http://www.rampant-books.com/book_2005_1_awr_proactive_tuning.htm
 |
Expert Remote DBA
BC is America's oldest and largest Remote DBA Oracle support
provider. Get real Remote DBA experts, call
BC Remote DBA today. |
 |
|
|
|
|
|
|
Burleson is the American
Team

BC
Remote Oracle Support
P.O. Box 511 • Kittrell, NC, 27544

Remote DBA
Copyright © 1996 -
2009 by Burleson Enterprises, Inc. All rights reserved.
Oracle® is the registered trademark of Oracle Corporation.
|

|