"Adrci 사용법"의 두 판 사이의 차이
DB CAFE
(→로그/trace 파일 정리) |
(→alert 로그 보기) |
||
43번째 줄: | 43번째 줄: | ||
</source> | </source> | ||
==== alert 로그 보기 ==== | ==== alert 로그 보기 ==== | ||
+ | 1. alert 로그 목록 확인 | ||
<source lang=sql> | <source lang=sql> | ||
ADRCI> show alert | ADRCI> show alert | ||
</source> | </source> | ||
+ | |||
+ | 2. 로그 번호 선택 | ||
+ | |||
+ | 3.로그 내용 검색 | ||
<source lang=sql> | <source lang=sql> | ||
ADRCI> show alert -p "message_text like '%incident%'" (<-- alert.log 파일의 incident를 볼수 있다) | ADRCI> show alert -p "message_text like '%incident%'" (<-- alert.log 파일의 incident를 볼수 있다) | ||
</source> | </source> | ||
+ | |||
+ | 4.최근 로그 확인 | ||
<source lang=sql> | <source lang=sql> | ||
ADRCI> show alert -tail 20 (<-- alert.log 파일에 tail 을 걸수 있다) | ADRCI> show alert -tail 20 (<-- alert.log 파일에 tail 을 걸수 있다) | ||
</source> | </source> | ||
+ | |||
==== 오류내역 보기 ==== | ==== 오류내역 보기 ==== | ||
<source lang=sql> | <source lang=sql> |
2024년 1월 12일 (금) 14:36 판
thumb_up 추천메뉴 바로가기
- DBA { Oracle DBA 명령어 > DBA 초급 과정 > DBA 고급 과정 }
- 튜닝 { 오라클 튜닝 목록 }
- 모델링 { 데이터 모델링 가이드 }
목차
1 ADR(Automatic Diagnostic Repository) 유틸[편집]
attach_file oracle dbms에 생성되는 trace 및 log 파일 관리 유틸 adrci 사용법.
1.2 adrci 실행[편집]
-- adrci 실행
[/home/oracle]$ adrci
1.3 ADR 명령어[편집]
- home 리스트 보고
ADRCI> show homes
ADRCI> set home 해당DB 패스 선택
ADRCI> show homepath
ADRCI> help purge (<-- HELP 명령어)
1.3.1 alert 로그 보기[편집]
1. alert 로그 목록 확인
ADRCI> show alert
2. 로그 번호 선택
3.로그 내용 검색
ADRCI> show alert -p "message_text like '%incident%'" (<-- alert.log 파일의 incident를 볼수 있다)
4.최근 로그 확인
ADRCI> show alert -tail 20 (<-- alert.log 파일에 tail 을 걸수 있다)
1.3.2 오류내역 보기[편집]
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 파일 정리[편집]
- 예시) 10일 : 14400분으로 명시(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