Adrci 사용법
DB CAFE
thumb_up 추천메뉴 바로가기
- DBA { Oracle DBA 명령어 > DBA 초급 과정 > DBA 고급 과정 }
- 튜닝 { 오라클 튜닝 목록 }
- 모델링 { 데이터 모델링 가이드 }
목차
1 ADRCI 유틸[편집]
attach_file oracle dbms에 생성되는 trace 및 log 파일 관리 유틸 adrci 사용법.
1.1 adr 디렉토리 위치 확인[편집]
SQL> show parameter diag
-- or
SQL> select * from v$diag_info;
- ADR BASE 위치 확인
1.2 adrci 실행[편집]
-- adrci 실행
[/home/oracle]$ adrci
==== ADR BASE 설정 ====
<source lang=sql>
ADRCI> set base c:\app\oracle
ADRCI> show base
ADRCI> show homepath
1.3 ADR homes 목록[편집]
ADRCI> show homes
ADRCI> show homepath
ADRCI> help purge (<-- HELP 명령어)
ADRCI> show alert
ADRCI> show alert -p "message_text like '%incident%'" (<-- alert.log 파일의 incident를 볼수 있다)
ADRCI> show alert -tail 20 (<-- alert.log 파일에 tail 을 걸수 있다)
ADRCI> show problem [-p <predicate_string>]
ADRCI> show problem -p "PROBLEM_ID=1"
ADRCI> show incident [-p <predicate_string>]
ADRCI> show incident -p basic
ADRCI> show incident -mode detail -p "incident_id=40165"
- mode = basic, brief, detail
ADRCI> describe incident
ADRCI> show incident -p "incident_id=40165 or incident_id=145"
1.4 ADR home 설정[편집]
ADRCI> set homepath diag\rdbms\orcl\orcl
1.5 현재 설정된 retention policy 정보[편집]
ADRCI> show control
- LONGP_POLICY(long term) -- set to 365 days(in hours, 365*24=8760) by default
- SHORTP_POLICY(short term) -- set to 30 days(in hours, 30*24=720) by default
1.5.1 설정되어 있는 retention policies (optional) 변경[편집]
ADRCI> set control(SHORTP_POLICY = 240) <-- 10 days
ADRCI> set control(LONGP_POLICY = 1095) <-- 1.5 months
1.6 로그/trace 파일 정리[편집]
- specify the time minutes(10 days = 10*24*60 = 14400)
ADRCI> purge -age 14400 -type alert
ADRCI> purge -age 14400 -type trace
ADRCI> purge -age 14400 -type incident
ADRCI> purge -age 14400 -type hm
ADRCI> purge -age 14400 -type utscdump
ADRCI> purge -age 14400 -type cdump
ADRCI> purge -age 14400 <-- 모든 파일에 대하여 1번에 Purge