Örnek
Şöyle yaparız
DBMS_SCHEDULER.CREATE_JOB (job_name => 'TRACE_OFF_JOB',JOB_TYPE => 'PLSQL_BLOCK',JOB_ACTION => 'DECLARE rowcnt number; BEGIN SELECT COUNT(*) INTO ROWCNT FROM MY_LOG; IF (ROWCNT >1000000) THEN UPDATE FOO_PROPERTIES SET VALUE = ''OFF'' WHERE KEY = ''DB_TRACE_LEVEL'';END IF; COMMIT; END;',start_date => SYSTIMESTAMP,REPEAT_INTERVAL => 'freq=hourly; BYMINUTE=0,20,40; bysecond=0',end_date => NULL,ENABLED => TRUE);
Hiç yorum yok:
Yorum Gönder