Thursday, March 19, 2009

DBMS_SCHEDULER - Alteração de atributo do JOB

Um exemplo simples de alteração de um atributo de um JOB via DBMS_SCHEDULER.

C:\Documents and Settings\jcorrea>sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Sex Mar 6 10:34:37 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.

idle> conn jccorrea@cmt
Informe a senha:
Conectado.
jccorrea@CMT> select repeat_interval from dba_scheduler_jos
2
jccorrea@CMT> select repeat_interval from dba_scheduler_jobs
2 where job_name='EXEC_PRC_SEARCH_DUP_TSN';

REPEAT_INTERVAL
------------------------------------------------------------------------------------------
----------
FREQ = WEEKLY ; INTERVAL= 1

jccorrea@CMT> begin
2 dbms_scheduler.set_scheduler_attribute('EXEC_PRC_SEARCH_DUP_TSN','REPEAT_INTERVAL','F
REQ = DAILY; interval=1');
3 end;
4 /
dbms_scheduler.set_scheduler_attribute('EXEC_PRC_SEARCH_DUP_TSN','REPEAT_INTERVAL','FREQ =
DAILY; interval=1');
*
ERRO na linha 2:
ORA-06550: line 2, column 1:
PLS-00306: wrong number or types of arguments in call to 'SET_SCHEDULER_ATTRIBUTE'
ORA-06550: line 2, column 1:
PL/SQL: Statement ignored

jccorrea@CMT> begin
2 dbms_scheduler.set_attribute('EXEC_PRC_SEARCH_DUP_TSN','REPEAT_INTERVAL','FREQ = DAIL
Y; interval=1');
3 end;
4 /

Procedimento PL/SQL concluÝdo com sucesso.

jccorrea@CMT> select repeat_interval from dba_scheduler_jobs
2 where job_name='EXEC_PRC_SEARCH_DUP_TSN';

REPEAT_INTERVAL
------------------------------------------------------------------------------------------
----------
FREQ = DAILY; interval=1

jccorrea@CMT>

Abs,

No comments: