ADRCI automatic diagnostic repository utility
From Robs_Wiki
Contents
set and check the ADR purging policies
-- Step 1: set the environment [oracle@exa-dm1dbadm01 ~]$ adrci ADRCI: Release 12.2.0.1.0 - Production on Fri Aug 10 08:17:33 2018 Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved. ADR base = "/u01/app/oracle" adrci> set homepath diag/rdbms/prod/prod1 -- Step 2: set the size policy to 1 GB adrci> set control (sizep_policy = 1073741824) -- Step 3: View current settings adrci> select shortp_policy, longp_policy from adr_control; ADR Home = /u01/app/oracle/diag/rdbms/prod/prod1: ************************************************************************* SHORTP_POLICY LONGP_POLICY -------------------- -------------------- 720 8760 1 row fetched -- value in hours adrci> select sizep_policy FROM adr_control_aux; ADR Home = /u01/app/oracle/diag/rdbms/prod/prod1: ************************************************************************* SIZEP_POLICY -------------------- 10737418240 1 row fetched
purge the ADR manually
USAGE: adrci> PURGE [[-i id1 | start_id end_id] | [-age mins [-type ALERT|INCIDENT|TRACE|CDUMP|HM|UTSCDMP] EXAMPLES: adrci> set home diag/rdbms/prod/prod1 adrci> purge adrci> purge -age 15 adrci> purge -i 123 456 adrci> purge -age 600 -type incident adrci> purge –age 720 –type alert
Use ADR to package an incident
Reference: ADR Different Methods to Create IPS Package (Doc ID 411.1) [oracle@exa-dm1dbadm01 trace]$ db [oracle@exa-dm1dbadm01 trace]$ prod [oracle@exa-dm1dbadm01 trace]$ adrci ADRCI: Release 12.1.0.2.0 - Production on Tue May 2 15:09:21 2017 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. ADR base = "/u01/app/oracle" adrci> show homes ADR Homes: diag/rdbms/prod/prod1 adrci> set home diag/rdbms/prod/prod1 adrci> show incident ADR Home = /u01/app/oracle/diag/rdbms/prod/prod1: ************************************************************************* INCIDENT_ID PROBLEM_KEY CREATE_TIME -------------------- ----------------------------------------------------------- ---------------------------------------- 16913 ORA 600 [klaprs_11] 2017-03-07 07:24:12.246000 +00:00 280319 ORA 4031 2017-04-05 10:56:42.720000 +01:00 361303 ORA 600 [kupclsCB_02] 2017-04-26 17:26:44.982000 +01:00 3 rows fetched adrci> IPS CREATE PACKAGE INCIDENT 361303 Created package 1 based on incident id 361303, correlation level typical adrci> IPS GENERATE PACKAGE 1 IN /tmp Generated package 1 in file /tmp/ORA600kup_20170502151142_COM_1.zip, mode complete
Create an Incident Package
Reference: ADR Different Methods to Create IPS Package (Doc ID 411.1) [oracle@cdf-dm1dbadm01 trace]$ . oraenv [oracle@cdf-dm1dbadm01 trace]$ prod [oracle@cdf-dm1dbadm01 trace]$ adrci ADRCI: Release 12.1.0.2.0 - Production on Tue May 2 15:09:21 2017 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. ADR base = "/u01/app/oracle" adrci> show homes ADR Homes: diag/rdbms/prod/prod adrci> set home diag/rdbms/prod/prod adrci> show incident ADR Home = /u01/app/oracle/diag/rdbms/prod/prod: ************************************************************************* INCIDENT_ID PROBLEM_KEY CREATE_TIME -------------------- ----------------------------------------------------------- ---------------------------------------- 16913 ORA 600 [klaprs_11] 2017-03-07 07:24:12.246000 +00:00 280319 ORA 4031 2017-04-05 10:56:42.720000 +01:00 361303 ORA 600 [kupclsCB_02] 2017-04-26 17:26:44.982000 +01:00 3 rows fetched adrci> IPS CREATE PACKAGE INCIDENT 361303 Created package 1 based on incident id 361303, correlation level typical adrci> IPS GENERATE PACKAGE 1 IN /tmp Generated package 1 in file /tmp/ORA600kup_20170502151142_COM_1.zip, mode complete