Wednesday 7 November 2012

ADR IPS Package


ADR Create IPS Package:

$ adrci
adrci> SHOW INCIDENT

adrci> IPS CREATE PACKAGE INCIDENT 192398
DIA-48448: This command does not support multiple ADR homes

$ adrci

adrci> SHOW HOMEPATH
ADR Homes:
diag/rdbms/mkkprj1/MKKPRJ1
diag/tnslsnr/mkkerpdr/mkkprj1
adrci> SET HOMEPATH diag/rdbms/mkkprj1/MKKPRJ1

adrci> IPS CREATE PACKAGE INCIDENT 192398
Created package 1 based on incident id 192398, correlation level typical
adrci> EXIT

cd /u03/MKKPRJ1/ORACLE/db/tech_st/11.2.0/admin/MKKPRJ1_mkkerpdr/diag/rdbms/mkkprj1/MKKPRJ1/incpkg

[oraprj1@mkkerpdr incpkg]$ ls
pkg_1

$ adrci
adrci> SHOW INCIDENT
adrci> IPS CREATE PACKAGE TIME '2011-08-13 16:46:21.537000' to '2011-08-14 09:51:12.443000'
Created package 2 based on time range 2011-08-13 16:46:21.537000 +04:00 to 2011-08-14 09:51:12.443000 +04:00, correlation level typical

adrci> IPS ADD INCIDENT 192414 PACKAGE 2;
Added incident 192414 to package 2
adrci> IPS ADD FILE ora7445 PACKAGE 2;

SQL> select * from v$diag_info;

   INST_ID NAME
---------- ----------------------------------------------------------------
VALUE
--------------------------------------------------------------------------------
         1 Diag Enabled
TRUE

         1 ADR Base
/u03/MKKPRJ1/ORACLE/db/tech_st/11.2.0/admin/MKKPRJ1_mkkerpdr

         1 ADR Home
/u03/MKKPRJ1/ORACLE/db/tech_st/11.2.0/admin/MKKPRJ1_mkkerpdr/diag/rdbms/dwtcp
rj1/MKKPRJ1

   INST_ID NAME
---------- ----------------------------------------------------------------
VALUE
--------------------------------------------------------------------------------

         1 Diag Trace
/u03/MKKPRJ1/ORACLE/db/tech_st/11.2.0/admin/MKKPRJ1_mkkerpdr/diag/rdbms/dwtcp
rj1/MKKPRJ1/trace

         1 Diag Alert
/u03/MKKPRJ1/ORACLE/db/tech_st/11.2.0/admin/MKKPRJ1_mkkerpdr/diag/rdbms/dwtcp
rj1/MKKPRJ1/alert


   INST_ID NAME
---------- ----------------------------------------------------------------
VALUE
--------------------------------------------------------------------------------
         1 Diag Incident
/u03/MKKPRJ1/ORACLE/db/tech_st/11.2.0/admin/MKKPRJ1_mkkerpdr/diag/rdbms/dwtcp
rj1/MKKPRJ1/incident

         1 Diag Cdump
/u03/MKKPRJ1/ORACLE/db/tech_st/11.2.0/admin/MKKPRJ1_mkkerpdr/diag/rdbms/dwtcp
rj1/MKKPRJ1/cdump

         1 Health Monitor

   INST_ID NAME
---------- ----------------------------------------------------------------
VALUE
--------------------------------------------------------------------------------
/u03/MKKPRJ1/ORACLE/db/tech_st/11.2.0/admin/MKKPRJ1_mkkerpdr/diag/rdbms/dwtcp
rj1/MKKPRJ1/hm

         1 Default Trace File
/u03/MKKPRJ1/ORACLE/db/tech_st/11.2.0/admin/MKKPRJ1_mkkerpdr/diag/rdbms/dwtcp
rj1/MKKPRJ1/trace/MKKPRJ1_ora_16512.trc

         1 Active Problem Count
4

   INST_ID NAME
---------- ----------------------------------------------------------------
VALUE
--------------------------------------------------------------------------------

         1 Active Incident Count
138


11 rows selected.

adrci>  IPS ADD INCIDENT 192414 PACKAGE 2;
Added incident 192414 to package 2

adrci> IPS ADD FILE '/u03/MKKPRJ1/ORACLE/db/tech_st/11.2.0/admin/MKKPRJ1_mkkerpdr/ora7445.txt' PACKAGE 2;
Added file /u03/MKKPRJ1/ORACLE/db/tech_st/11.2.0/admin/MKKPRJ1_mkkerpdr/ora7445.txt to package 2





ADR Different Methods to Create IPS Package

Creating package based on incident:

adrci> SHOW INCIDENT 
adrci> IPS CREATE PACKAGE INCIDENT incident_number

Creating Empty package:

adrci> IPS CREATE PACKAGE
This creates an empty package. You must use the IPS ADD INCIDENT or IPS ADD FILE commands to add diagnostic data to the package before generating it. 

Creating package based on problem ID:

adrci> SHOW INCIDENT -MODE BRIEF
adrci> IPS CREATE PACKAGE PROBLEM <<<problem_ID>>>

This creates a package and includes diagnostic information for incidents that reference the specified problem ID. (Problem IDs are integers.) You can obtain the problem ID for an incident from the report displayed by the SHOW INCIDENT -MODE BRIEF command. Because there can be many incidents with the same problem ID, ADRCI adds to the package the diagnostic information for the first three incidents ("early incidents") that occurred and last three incidents ("late incidents") that occurred with this problem ID, excluding any incidents that are older than 90 days.

Creating package based on problem key:

adrci> IPS CREATE PACKAGE PROBLEMKEY "<<<problem_key>>>"
The problem key must be enclosed in single quotes (') or double quotes (") if it contains spaces or quotes. 

Creating package based on time interval

This creates a package and includes diagnostic information for all incidents that occurred from sec seconds ago until now. sec must be an integer. 

adrci> IPS CREATE PACKAGE SECONDS sec
adrci> IPS CREATE PACKAGE TIME 'start_time' TO 'end_time' 

This creates a package and includes diagnostic information for all incidents that occurred within the specified time range. start_time and end_time must be in the format 'YYYY-MM-DD HH24:MI:SS.FF TZR'. This is a valid string for the NLS_TIMESTAMP_TZ_FORMAT initialization parameter. The fraction (FF) portion of the time is optional, and the HH24:MI:SS delimiters can be colons or periods.

Adding Incidents and files to the logical package:

adrci> IPS ADD INCIDENT incident_number PACKAGE package_number
adrci> IPS ADD FILE filespec PACKAGE package_number/package_id

Generate a physical incident package:

Once you have created a logical package using one of the above methods, next step is to generate a physical package. 
adrci> IPS GENERATE PACKAGE package_number IN path

This generates a complete physical package (zip file) in the designated path. For example, the following command creates a complete physical package in the directory /home/mkkdbora/diagnostics from logical package number 2: 
adrci>IPS GENERATE PACKAGE 2 IN /home/mkkdbora/diagnostics

You can also create and generate package with one command : IPS Pack
adrci> IPS PACK INCIDENT incident_id IN path
All the methods discussed above apply to 'IPS pack' as well.


Try these packages 

No comments:

Post a Comment