행위

"Adrci 사용법"의 두 판 사이의 차이

DB CAFE

(ADR BASE 설정)
(ADR BASE 설정)
23번째 줄: 23번째 줄:
 
* ADR BASE 의 DEFAULT 경로는 ORACLE_BASE 경로임
 
* ADR BASE 의 DEFAULT 경로는 ORACLE_BASE 경로임
 
* 또는 오라클 내에서 diagnostic_dest 파라미터 경로임
 
* 또는 오라클 내에서 diagnostic_dest 파라미터 경로임
 
+
<source lang=sql>
 +
SQL> show parameter diagnostic_dest
 +
</source>
 
<source lang=sql>
 
<source lang=sql>
 
ADRCI> set base c:\app\oracle
 
ADRCI> set base c:\app\oracle

2024년 1월 12일 (금) 14:42 판

thumb_up 추천메뉴 바로가기


1 ADR(Automatic Diagnostic Repository) 유틸[편집]

  1. RDBMS 진단을 위한 파일 기반 저장소임
  2. ADR 은 Trace file, Alertlog, Incident dump, Core file 등을 찾을 수있는 중앙 집중식 디렉토리 구조로 되어있음
  3. 데이터베이스, ASM (Automatic Storage Management), CRS (Cluster Ready Services) 및 기타 Oracle 제품 또는 구성 요소는 모든 진단 데이터를 ADR에 저장함
  4. 각 제품의 각 인스턴스는 자체 ADR 홈 디렉토리 아래에 진단 데이터를 저장함

 attach_file oracle dbms에 생성되는 trace 및 log 파일 관리 유틸 adrci 사용법.

1.1 adr 디렉토리 위치 확인[편집]

  • ADR Home/Base 위치 확인
SQL> select * from v$diag_info;

1.2 adrci 실행[편집]

-- adrci 실행 
[/home/oracle]$ adrci

1.2.1 ADR BASE 설정[편집]

  • ADR BASE 의 DEFAULT 경로는 ORACLE_BASE 경로임
  • 또는 오라클 내에서 diagnostic_dest 파라미터 경로임
SQL> show parameter diagnostic_dest
ADRCI> set base c:\app\oracle
ADRCI> show base
ADRCI> show homepath

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