Oracle® Database Administrator's Guide 11g Release 1 (11.1) Part Number B28310-01 |
|
|
View PDF |
An example of altering a job using DBMS_JOB
is the following:
BEGIN DBMS_JOB.WHAT(31, 'INSERT INTO employees VALUES (7935, ''TOM'', ''DOGAN'', ''tom.dogan@xyzcorp.com'', NULL, SYSDATE,''AD_PRES'', NULL, NULL, NULL, NULL);'); COMMIT; END; /
This changes the action for JOB1
to insert a different value. An equivalent statement using DBMS_SCHEDULER
is the following:
BEGIN DBMS_SCHEDULER.SET_ATTRIBUTE( name => 'JOB1', attribute => 'job_action', value => 'INSERT INTO employees VALUES (7935, ''TOM'', ''DOGAN'', ''tom.dogan@xyzcorp.com'', NULL, SYSDATE, ''AD_PRES'', NULL, NULL, NULL, NULL);'); END; /