ADRCI is a command-line tool that is part of the fault diagnosability infrastructure introduced in Oracle Database 11g. ADRCI enables you to:

- View diagnostic data within the Automatic Diagnostic Repository(ADR).

- View Health Monitor reports.

- Package incident and problem information into a zip file for

transmission to Oracle Support.

 

Diagnostic data includes incident and problem descriptions, trace files, dumps, health monitor reports, alert log entries, and more.

ADR data is secured by operating system permissions on the ADR directories, hence there is no need to log in to ADRCI.

ADRCI has a rich command set, and can be used in interactive mode or within scripts.

 

Oracle DBA업무를 하다보면 일반적으로 Oracle의 각종 Log 파일을 많이 보게 된다. 이러한 Log 파일 중 Oracle Database와 관련된 alert.log 파일은 실제 각종 문제가 발생했을 경우 많은 도움을 주는 Log 파일이다.

 

Oracle 11g 부터는 우리가 알고 있던 위치에 Log 파일과 trc 파일을 찾을 수가 없다.

 

ADR(Automatic Diagnostic Repository)

ADR_BASE의 위치는 INSTANCE에서 DIAGNOSTIC_DEST Parameter로

확인이 가능하다.

- $ORACLE_BASE가 설정되어 있다면, DIAGNOSTIC_DEST의 위치는 $ORACLE_BASE

- $ORACLE_BASE가 설정되어 있지 않다면, DIAGNOSTIC_DEST의 위치는 $ORACLE_HOME/log 이다.

 

 

DIAGNOSTIC_DEST 확인 하는 방법

SQL> SHOW PARAMETER DIAGNO

SQL> SELECT * FROM V$DIAG_INFO

 

ADR BASE 위치 확인

 

Tree 구조 확인

 

ADR HOME

ADR HOME은 BASE보다 더 자세한 내용이 있으며 실제 alert.log 파일과 trc파일이 생성되는 곳을 이야기 한다.

 

Alert.log의 위치가 diag/rdbms/orcl/orcl , diag/tnslsnr/DB1/listener

위 경로에 위치한다. Trace에는 기존과 같이 alert_<SID>.log 파일이 존재하고 alert에는 xml 파일 형태로 log.xml 파일이 생성 되어있다.

 

ADRCI(ADR Command line Interface)

The Automatic Diagnostic Repository (ADR) is a file-based repository for database diagnostic data such as traces, dumps, the alert log, health monitor reports, and more. It has a unified directory structure across multiple instances and multiple products. Beginning with release 11g, the database, Oracle Automatic Storage Management (Oracle ASM), and other Oracle products or components store all diagnostic data in the ADR. Each instance of each product stores diagnostic data and Oracle ASM, each database instance and each Oracle ASM instance has a home directory within the ADR. The ADR's unified directory structure enables customers and Oracle Support to correlate and analyze diagnostic data across multiple instance and multiple products.

 

 

 

Problem

A problem is a critical error in the database. Critical errors include internal errors such as ORA-00600 and other severe errors such as ORA-07445 (operating system exception) or ORA-04031 (out of memory in the shared pool). Problems are tracked in the ADR. Each problem has a problem key and a unique problem ID. (See "Problem Key".)

Problem은 데이터베이스에 심각한 오류를 뜻하고 ORA-00600, ORA-07445, ORA-04031 같은 문제는 ADR에서 추적된다.

 

Incident

각 Incident는 ADR 내에서 고유 숫자 ID형태로 식별되며, 특정한 ORA-XXXX 메시지가 여러 번 기록되는 경우라면 ORA-XXXX이라는 하나의 Problem에 대해서 여러 Incident가 ADR내에 생성을 의미한다.

 

Alert Log 확인

Adrci> show alert –tail

 

Adrci> show alert –tail 50        /* 마지막 50라인 확인 */

또는 show alert –tail –f        /* 지속적인 모니터링 */

Adrci> show incident –p "problem_key='ORA'"

 

ADRCI에서 show 명령어를 실행할 경우, Default Editor가 실행된다.

만약 이 부분에 문제가 있다면 다음과 같이 Editor를 지정할 수 있다.

Adrci> set editor vi

 

Server Trace File 찾기

기본적으로 'SHOW TRACEFILE' CMD를 사용한다.

Adrci> show tacefile

 

Adrci> show trace orcl_lgwr_5156.trc

 

Adrci> show tracefile %mmon%        /* -rt : Time Reverse order */

Purging trace files Automatically

기본 보관주기는 720시간 (한 달)을 보관한다.

 

사용할 수 있는 정책

SHORTP_POLICY : Retention for ordinary trace files

LONGP_POLICY : Retention for like incident files

 

Adrci> set control(SHORTP_POLICY = 360)

Adrci> set control(LONGP_POLICY = 2160)

Adrci> show control

 

Trace files에 관해서 아래와 같은 Policy 수립 가능

Adrci> purge –age 2880 –type trace

Adrci> purge –age 129600 –type ALERT

Adrci> purge –age 43200 –type INCIDENT

Adrci> purge –age 43200 –type TRACE

Adrci> purge –age 43200 –type CDUMP

Adrci> purge –age 43200 –type HM

IPS(Incident Packaging Service)

Incident 정보를 Packaging하는 것을 이야기 한다. IPS를 이용하면 Incident 정보를 지정 폴더에 특정 Incident 정보로 압축 파일로 만들어 SR(Service Request)을 통해 전송할 수 있다.

 

Adrci> ips pack problem 5137 in /tmp

=> Problem id 5137에 관련된 trace file들을 /tmp 폴더에 압축파일 생성.

Adrci> ips pack incident 3184 in /tmp

=> Incident id 3184에 관련된 trace file들을 /tmp 폴더에 압축 파일 생성.

Adrci> ips pack seconds 8

=> 최근 8초 이내에 발생한 Incident에 대한 압축 파일 생성

 

Adrci> ips pack problemkey "ORA 2013"

=> Problem_key 'ORA 2013'를 가지는 모든 Problem에 관련된 trace file들을 현재 directory에 압축파일로 생성.

사업자 정보 표시
(주)블루원 | 김홍태 | 서울특별시 용산구 원효로 4가 135 금홍 2빌딩 | 사업자 등록번호 : 106-86-76684 | TEL : 02-3272-7200 | Mail : support_ora@blueone.co.kr | 통신판매신고번호 : 호 | 사이버몰의 이용약관 바로가기

+ Recent posts