Search This Blog

Saturday, January 18, 2014

ADRCI Walkthrough.

 
Invoke adrci as the oracle user.


> adrci

ADRCI: Release 11.2.0.3.0 - Production on Fri Jan 17 22:38:57 2014

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

ADR base = "/opt/oracle"
adrci> show home
ADR Homes:
diag/diagtool/user_oracle/host_365570786_11
diag/rdbms/orcl/ORCL
diag/asm/+asm/+ASM4
diag/tnslsnr/orcl4/listener_cad

Set the home

adrci> set home diag/rdbms/orcl/ORCL

To check the alert log use the following option.

adrci> show alert -tail -f
2014-01-17 22:28:35.440000 +00:00
ALTER SYSTEM ARCHIVE LOG
2014-01-17 22:28:38.414000 +00:00
Thread 4 advanced to log sequence 1392 (LGWR switch)
  Current log# 11 seq# 1392 mem# 0: +REDO/orcl/redot4g11f1.rdo
  Current log# 11 seq# 1392 mem# 1: +REDO/orcl/redot4g11f2.rdo
Archived Log entry 10628 added for thread 4 sequence 1391 ID 0xc5495541 dest 1:

or

adrci> show alert -tail 

or

adrci> show alert 


To check for severe problems in database.

adrci> show problem

ADR Home = /opt/oracle/diag/rdbms/orcl/ORCL:
*************************************************************************
PROBLEM_ID           PROBLEM_KEY                                                 LAST_INCIDENT        LASTINC_TIME
-------------------- ----------------------------------------------------------- -------------------- ----------------------------------------
2                    ORA 600 [723]                                               3807                 2007-06-18 21:35:47.862114 -07:00
1                    ORA 29770                                                   24129                2011-10-21 19:08:24.097000 +00:00
2 rows fetched


To check for incedents related to problems.

adrci> show incident

ADR Home = /opt/oracle/diag/rdbms/orcl/ORCL:
*****************************************************************************
INCIDENT_ID       PROBLEM_KEY               CREATE_TIME
----------------- ------------------------- ---------------------------------
3808              ORA 603                   2007-06-18 21:35:49.322161 -07:00
3807              ORA 600 [723]             2007-06-18 21:35:47.862114 -07:00
3805              ORA 600 [723]             2007-06-18 21:35:25.012579 -07:00
3804              ORA 1578                  2007-06-18 21:35:08.483156 -07:00
4 rows fetched


To get more details on the incident execute the following

adrci> show incident -mode detail -p "incident_id=3807"

adrci> show trace 

This statement lists the names of all trace files related to incident number 1681:

adrci> SHOW TRACEFILE -I 1681




adrci> show control

ADR Home = /opt/oracle/diag/rdbms/orcl/ORCL:
*************************************************************************
ADRID                SHORTP_POLICY        LONGP_POLICY         LAST_MOD_TIME                            LAST_AUTOPRG_TIME                        LAST_MANUPRG_TIME                        ADRDIR_VERSION       ADRSCHM_VERSION      ADRSCHMV_SUMMARY     ADRALERT_VERSION     CREATE_TIME
-------------------- -------------------- -------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- -------------------- -------------------- -------------------- -------------------- ----------------------------------------
3783208084           720                  8760                 2013-12-16 19:28:24.827055 +00:00        2014-01-17 21:09:07.527157 +00:00        2014-01-17 10:15:21.303696 +00:00        1                    2                    80                   1                    2013-12-16 19:28:24.827055 +00:00
1 rows fetched

All the tracefiles will stay for 30 days (720 hours),
but all the incident files would be kept for one year (8760 hours) by default.

This can be changed by the following command

adrci> set control (SHORTP_POLICY = 48)

adrci> set control (LONGP_POLICY = 48)

 
Purging manually
 
Files can be purged manually by the following commands. The value "2880" is in minutes.
 
adrci> purge -age 2880 -type incident
adrci> purge -age 2880 -type ALERT
adrci> purge -age 2880 -type TRACE
adrci> purge -age 2880 -type CDUMP
adrci> purge -age 2880 -type HM

Creation of Packages & ZIP files to send to Oracle Support

adrci> set home diag/asm/+asm/+ASM1
adrci> show problem

ADR Home = /opt/oracle/diag/asm/+asm/+ASM1:
*************************************************************************
PROBLEM_ID           PROBLEM_KEY
-------------------- -----------------------------------------------------------
1                    ORA 4030
1 rows fetched


ADR Home = /opt/oracle/diag/asm/+asm/+ASM1:
*************************************************************************
PROBLEM_ID           PROBLEM_KEY
-------------------- -----------------------------------------------------------
1                    ORA 4030
1 rows fetched

adrci> ips create package problem 1 correlate all
Created package 1 based on problem id 1, correlation level all

#Create logical package with correlation level all.

adrci> ips generate package 1 in "/opt/oracle"
Generated package 1 in file /opt/oracle/ORA4030_20140219202848_COM_1.zip, mode complete


#Now create a zip file from the logical package



 

0 comments:

Post a Comment