Obsidian/Recognition/Programing/Tibero/JOB 관련.md

29 lines
591 B
Markdown
Raw Normal View History

2023-08-14 16:19:25 +00:00
```sql
-- JOB의 조회
SELECT * FROM USER_JOBS;
-- JOB의 등록
DECLARE
job_no number;
BEGIN
-- DBMS_JOB.SUBMIT(잡넘버,PROCEDURE 내용, 최초실행시간,실행주기);
DBMS_JOB.SUBMIT(job_no,'UIC.PROC_EAI_IF_TEST_DAYS( ''20230428'', ''20230429'');', SYSDATE, 'SYSDATE + 1');
END;
-- JOB의 변경
BEGIN DBMS_JOB.NEXT_DATE(잡넘버, TRUNC(SYSDATE)+1+1/24/60); commit; end;
-- JOB의 삭제
BEGIN DBMS_JOB.REMOVE(잡넘버); commit; end;
-- JOB의 정지
BEGIN DBMS_JOB.BROKEN(잡넘버,FALSE); commit; end;
-- JOB 실행
BEGIN DBMS_JOB.RUN(잡넘버); commit; end;
```