본문 바로가기

DB/oracle12

oracle / job / batch 참고 : https://docs.oracle.com/database/121/ARPLS/d_job.htm#ARPLS66560 1. 신규등록 DBMS_JOB.SUBMIT( job OUT BINARY_INTEGER, what IN VARCHAR2, next_date IN DATE DEFAULT SYSDATE, interval IN VARCHAR2 DEFAULT 'NULL', no_parse IN BOOLEAN DEFAULT FALSE, instance IN BINARY_INTEGER DEFAULT ANY_INSTANCE, force IN BOOLEAN DEFAULT FALSE ); ex) DECLARE job NUMBER; BEGIN DBMS_JOB.SUBMIT(job --자동생성 , 'DBMS_OUTPUT... 2020. 4. 17.
oracle / dbms_scheduler 1. 조회 SELECT * FROM user_scheduler_jobs; SELECT * FROM dba_scheduler_jobs; SELECT NEXT_RUN_DATE,REPEAT_INTERVAL, a.* FROM user_scheduler_jobs a; ---신규 생성후 NextRunData , RepeatInterval 확인 2. 권한부여 grant create any job to 유저명 ; 2. 신규등록 begin dbms_scheduler.create_job( -- 신규 JOB을 생성 job_name => 'insert_job_test1' , -- dbms_scheduler 내에서 사용될 job 이름지정 job_type => 'plsql_block' , -- 5번줄에 적은 프로그램의 타입을 적.. 2020. 4. 17.
oracle / expdp / impdp - 디렉토리 조회 sql> SELECT * FROM dba_directories; - expdp 사용법 expdp system/비밀번호 schemas=유저명1 DUMPFILE=DUMPDIR:유저명1_201805281555.dmp logfile=DUMPDIR:유저명1_201805281555.log impdp system/유저명2 DUMPFILE=DUMPDIR:유저명2_201805281555.dmp logfile=DUMPDIR:유저명2_201805281555.log REMAP_SCHEMA=유저명1:유저명2 REMAP_TABLESPACE=XXXX_DATA_TBL:TTTT_data_tbl 2020. 4. 17.
oracle / 암호화 대상칼럼조회 SELECT a.OWNER , A.column_id ,A.TABLE_NAME , A.COLUMN_NAME , C.COMMENTS ,A.DATA_TYPE , A.DATA_LENGTH , A.DATA_PRECISION , A.DATA_SCALE , A.NULLABLE , B.POSITION KEY , A.DATA_DEFAULT , B.CONSTRAINT_NAME , REPLACE(INITCAP(A.COLUMN_NAME),'_') AS CAMELCASE FROM (SELECT * FROM all_tab_columns WHERE 1=1 ) A , (SELECT * FROM all_col_comments WHERE 1=1 ) C , (SELECT X0.OWNER ,X0.TABLE_NAME ,X0.COLUMN_NA.. 2020. 4. 17.
반응형