10 de jul. de 2008

JOB no Oracle 10G

Nossa nunca pensei que iria apanhar no agendamento de tarefas no Oracle (por ser uma atividade relativamente simples). Depois de vários erros abaixo igual os abaixo achei a solução:

ERRO na linha 1:
ORA-06550: line 1, column 23:
PLS-00363: expression '377' cannot be used as an assignment target
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

ERRO na linha 2:
ORA-06550: line 2, column 67:
PLS-00103: Encountered the symbol "SYSDATE" when expecting one of the following:
) , * & | = - + < / > at in is mod remainder not rem => ..
<um expoente (**)> <> or != or ~= >= <= <> and or like LIKE2_
LIKE4_ LIKEC_ between || multiset member SUBMULTISET_
The symbol "," was substituted for "SYSDATE" to continue.

Solução:

15:33:56 SQL> execute DBMS_JOB.iSUBMIT(377, 'SUPORTERJ.BCS_P_WEB_AGENTE;', SYSDATE,'(TRUNC(SYSDATE)+ 1)+3/24');
Procedimento PL/SQL concluído com sucesso.

Decorrido: 00:00:00.63

15:34:17 SQL> execute DBMS_JOB.REMOVE(377);
Procedimento PL/SQL concluído com sucesso.

Nenhum comentário: