Concat 함수 특정 문자열을 합치기 위해 활용되는 함수 -> 실제 실무에서 많이 활용되므로 다양하게 추출하는 방법 테스트 필요 1. export 스크립트 추출 select 'expdp username/password job_name=export_table_'|| table_name ||' '||''||'directory=:v_directory_name dumpfile='|| table_name ||'.dmp'||' '||'logfile=export_table_'|| table_name ||'.log'||' '||'tables='|| owner ||'.'|| table_name ||' '||''||'include=table' from dba_tables where table_name like ':v_t..
bat 파일 내용 archive log 관련하여 특정 일자 경과한 파일 삭제 bat script @echo off /*loop 수행*/ :LOOP /* 1시간 단위로 loop 수행*/ timeout /t 3600 < 1시간 단위로 삭제 진행 /* F:\archives에 확장자가 0001인 @file을 삭제*/ forfiles /P F:\archive /S /M *.0001 /D -0 /C "cmd /c del @file" goto LOOP :QUIT @echo on 옵션관련 - forfiles (참고자료 https://y-iteam.tistory.com/50) /P : 검색을 시작할 경로 지정 (=작업할 경로) /S : 하위 폴더를 포함하도록 지정 /M : 검색 마스크에 따라 파일 검색 (default ..
root가 cluster 제어할 수 있도록 bash 적용 su - vi ~/.bash_profile 아래내용 기입 # User specific environment and startup programs export ORACLE_HOME=/ora_engine/12c/dbhome_1 export GRID_HOME=/grid_engine/12c/grid PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:$GRID_HOME/bin export PATH RAC 기동 절차 - 기동 시작 절차 (중지는 반대로 4>3>2>1) 순서 작업 비고 1 CRS 시작 양쪽 노드에서 2 CRS 어플리케이션 시작 한 노드에서 3 Listerner 시작 한 노드에서 4 DB 인스턴스 시작 한 노드에서 (1) CRS..
spool 파일명 // ex) /user/test/a.txt -- spool 관련 명령어 . . . ex) set echo off; ....명령 구문..... // 쿼리 또는 @쿼리파일명 ex) /user/test/a.sql spool off spool은 명령들을 일괄로 처리해 주는 명령어 이다. spool 명령에 파일명을 파라미터로 지정하면 spool에서 실행된 모든 명령 들이 파일로 저장된다. spool 관련 명령어 set heading off : 헤더가 표시되지 않고 데이터만 표시한다. set pagesize 0 : 기본값은 14이며 공백을 없애기 위해 0으로 세팅, pagesize가 0이어도 컬럼명이 출력되지 않는다. 50000 (max) set echo off : 명령이 표시되지 않게 off한다..
위 분석 방법은 정확한 내용이 아닌 테스트를 통해 개념정리입니다. 테스트 환경 - OS : Centos 7.9 - DB : Oracle 11.2.0.4 테스트 시나리오 enq Tx - row lock entention 발생시킴 dba_objects 2개 이상 count로 조회하여 강제 I/O 발생 oradebug로 trace 로그 분석 => oradebug는 경우에 i/o를 많이 잡아먹기때문에 DB가 멈출수 있어 잦은 발생보다 필요로할때 추출하는 것이 제일 best oradebug commands SQL> oradebug help HELP [command] Describe one or all commands SETMYPID Debug current process SETOSPID Set OS pid of ..