DB17 oracle / random YYYYMMDD oracle 랜덤 날짜 구하기 UPDATE 테이블 SET 칼럼 = ROUND(dbms_random.value(2001,2014)) || TO_CHAR( ROUND(dbms_random.value(1,12)) , 'FM09') || TO_CHAR( ROUND(dbms_random.value(1,28)) , 'FM09') 2020. 4. 22. 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. 이전 1 2 3 4 5 다음 반응형