ORACLE Database ADRCI



ADRCI is Automatic Diagnostic Repository Command Interpreter. Its command line tool to manage diagnostic data. Diagnostic data include alert log, trace file, dump, HM report and more.

Automatic Diagnostic Repository
ADR is file based repository for Oracle database diagnostic data. It stores alert log, core dump, health monitor reports. The same directory structure is used across multiple products of Oracle database like listener, CRS, ASM.

ADRCI provide interactive mode, to launch it use adrci command. Make sure Set ORACLE_HOME and PATH variable properly. The relative location from where adrci launched that define behavior of it. If you launch adrci utility from perticular database diagnostic destination then home path set to that database by default. Using show control purge policy can be found.

adrci> show control;
ADR Home = /oracle/app/oracle/diag/rdbms/testdb/testdb: *************************************************************************
ADRID  SHORTP_POLICY   LONGP_POLICY   LAST_MOD_TIME   LAST_AUTOPRG_TIME   LAST_MANUPRG_TIME   ADRDIR_VERSION   ADRSCHM_VERSION   ADRSCHMV_SUMMARY   ADRALERT_VERSION   CREATE_TIME
-------------------- -------------------- -------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- -------------------- -------------------- -------------------- -------------------- ----------------------------------------
333787895   24   24   2018-10-08 13:41:37.435752 +01:00   2018-10-15 07:51:10.564017 +01:00   1   2   82   1   2017-02-14 20:38:07.899851 +00:00

Diagnostic components included in LONGP_POLICY are alert log, incident, sweep, stage, HM. Where as diagnostic components included in SHORTP_POLICY are trace, CDUMP, IPS, UTSCDMP. Value to LONGP_POLICY and SHORTP_POLICY are provided in hours. Default value of LONGP_POLICY is 8760 which evaluates to 1 year. Default value of SHORTP_POLICY is 720 which evaluates to 1 month. Using set control retention period of these policies can be changed.

adrci> set control (SHORTP_POLICY=128)
adrci> set control (LONGP_POLICY=710)

MMON background process responsible for ADRCI policies. It purges diagnostic data according to policy. It execute after every seven days. If you want to store diagnostic data of less than 7 days, then purge it manually. To schedule purge execution using crontab, use below code.

https://github.com/dtdhirajt/ORACLE-ADRCI-schedular-script/blob/master/ORACLE_ADRCI_Purge.sh

Listener and clusterware diagnostic data can be managed by using ADRCI. If you want to store cluster, listener and asm diagnostic data of less than 7 days, then schedule purge execution using crontab, use below code.

https://github.com/dtdhirajt/ORACLE-ADRCI-schedular-script/blob/master/GRID_ADRCI_Purge.sh

Comments

Popular posts from this blog

Oracle RAC Database QUIESCE Mode

OMS 13c Port Requirement

PostgreSQL pg_controldata utility