ADRCI Commands

adrci: Automatic Diagnostic Repository Command Interpreter

Um für einen Oracle Service Request die erforderlichen Files bereitzustellen ist das IPS aus dem ADR eine nützliche Funktion. Es gibt eine Übersichten zu den einzelnen Features und in oracle-base.com werden die 12c Erweiterungen dargestellt.

adrci script=/tmp/hed/scripts/test.adrci

# adr script
set home orcl1
spool /tmp/alert-ora.log
show alert -p "message_text like '%ORA-%'" -term;
spool off

alias sa='adrci exec="set home $ORACLE_SID; show alert"'

help purge
help show

show base
show homes
set home

show alert -tail –f;
show alert -p "message_text like '%ORA-%'" -term;
show alert -p "originating_timestamp >= systimestamp-1/24" -term;
show alert -p "message_text like '%ORA- 600%' and originating_timestamp >= systimestamp-30" -term;
show alert -p "message_text like '%DROP%'" -term;

show control;
set control (SHORTP_POLICY = 336); 
set control (LONGP_POLICY = 1440);

purge -age 1440 -type alert;
purge -age 10080 -type alert;
purge -i 12345;
purge -i 12345 23456;



show incident;
show problem;
show tracefile [-i 123] [-[r]t]; 

delete from problem where problem_id = 2
delete from incident where incident_id > 1

Incident Packaging Services  (IPS)

IPS CREATE PACKAGE INCIDENT inc_number;
IPS CREATE PACKAGE PROBLEM problem_ID;
IPS CREATE PACKAGE PROBLEMKEY "problem_key";
IPS CREATE PACKAGE TIME 'start_time' TO 'end_time';

IPS GENERATE PACKAGE 1 IN /home/seiler/diagnostics;
IPS SHOW FILES PACKAGE 1;

IPS PACK INCIDENT 12345 IN /tmp/hed/diagnostics;