IPs simple Use method

Source: Internet
Author: User
Tags pack time interval
IPs simple Use Method:
IPS (Incident packaging service) is a new feature of 11G that is designed to view all dump and trace files associated with an error and can be easily typed into a package, which I think is extremely convenient for DBAs to diagnose remotely.
Pre: Set Oracle_home and PATH environment variables first before use.
Enter the ADRCI console:
$adrci
Adrci tool is started.
List ADR Home:
Adrci> Show Home
Diag/rdbms/v11/v11
Set Adrhome path:
Adrci> Set HomePath diag/rdbms/v11/v11
List problem:
Adrci> Show Problem
--will list ORA-600, ORA-7445, ORA-1578, and accompanying problem_id, Problem_key, and error occurrence dates.
Pack the error trace file
adrci> IPs pack problem <problem id> in/tmp
-This action packages the TRC file associated with the error to/TMP according to PROBLEM_ID.

Annex I: ADR how to Package diagnostic information in 11g

Invoke Adrci and set Adr_home.
Can create a logical package based on a incident number, a problem number, a problem key, or a time interval. Create A logical package such that it'll be most useful to diagnose the error of your.
I) creating package based on incident.
Select correct incident If there are many incidents.
Adrci>show INCIDENT
Adrci>ips CREATE PACKAGE INCIDENT incident_number
II) Creating Empty package.
Adrci>ips CREATE PACKAGE
This is creates an empty package. You are must use the IPs add INCIDENT or IPs add FILE commands to add diagnostic data to the package before it.
III) Creating package based on problem ID
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.) Can obtain the problem ID for a incident from the
The 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 the Three incidents ("early incidents") that occurred and last three incidents ("late incidents")
occurred with the problem ID, excluding any incidents that are older than.
IV) Creating package based on problem key
Adrci>ips CREATE PACKAGE problemkey "Problem_key"
The problem key must is enclosed in single quotes (') or double quotes (") if it contains spaces or quotes.
V) Creating package based on time interval.
This creates a package and includes diagnostic information to all incidents that occurred from sec
Seconds ago until now. SEC must is 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 to all incidents that occurred within the
Specified time range. Start_time and End_time must is 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:
Can add more files or more incidents to the package.
Adrci>ips ADD INCIDENT incident_number PACKAGE package_number
Adrci>ips ADD FILE filespec PACKAGE package_number
Filespec is the complete path and name of the trace file to add.
Package_number is the package ID.
Generate a physical incident package:
Once you have created a logical package using one of the above methods, and next step are to generate a physical.
Adrci>ips GENERATE PACKAGE Package_number in Path
This is 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/steve/diagnostics
From logical Package number 2:
Adrci>ips GENERATE PACKAGE 2 in/home/steve/diagnostics
Upload This package to the SR for diagnosing the problem.
You can also the create and generate package with one command:ips Pack.
Adrci>ips PACK INCIDENT incident_id in Path
All of the methods discussed above apply to ' IPS pack ' as.

Annex II: Database 11g:quick Steps to Package and Send Critical the Error diagnostic information to Support:
ORACLE11G provides tools and methods to automatically identify and gather trace files related to a problem (a critical err or in the database environment) or a incident (a occurrence of a problem). This facility is known as the Incident packaging Services (IPS). The Support Workbench (GUI) and Adrci (command line) utilities are two interfaces to the Incident Services. Every occurrence of a critical error (problem) in the database creates a incident.
Steps in identifying and sending files to support.
1. Are notified of a critical error reported in the database environment:
Sql> select * from Atab;
SELECT * FROM Atab
*
ERROR at line 1:
Ora-01578:oracle data Block corrupted (file # 6, Block # 11)
Ora-01110:data file 6: '/OPT/ORACLE/ORADATA/DB11G/TT.DBF '
2. Check for the "error reported in the" instance alert file and in the ADR.
To check for the error reported in the ADR:
With the 11g environment being set, from the OS command prompt invoke the Adrci utility:
$ adrci
Let Adrci know which Oracle environment to investigate:
Adrci> Show Home
--show Home would list all the ADR homes. Set the proper database ADR home with Adrci.
Adrci> Set HomePath Database_home
Check for the problems reported:
Adrci> Show Problem
ADR home =/opt/oracle/diag/rdbms/db11g/db11g:
*************************************************************************
problem_id Problem_key last_incident Lastinc_time
------------ -------------- --------------- ---------------------------------
1 ORA 1578 18104 2009-06-01 22:06:19.501207 +10:00
1 Rows fetched
You can have multiple problems reported. Create a package for the one which needs to be investigated.
3. Check for the incidents reported for the problem which needs to be packaged
Each occurrence of the problem is called a ' incident '. The instance alert file would show all the incidents reported. Each incident is associated with a unique incident ID in the ADR.
From the Adrci prompt, execute the show INCIDENT command for the problem to is investigated, by specifying the associated Problem key. You can get the problem key from the show Problem command:
Adrci> show incident-p "problem_key= ' ORA 1578 '"
ADR home =/opt/oracle/diag/rdbms/db11g/db11g:
*************************************************************************
incident_id Problem_key Create_time
--------------- ------------------------ ----------------------------------
18147 ORA 1578 2009-06-01 22:02:08.805002 +10:00
1 Rows fetched
You can-multiple incidents reported for the same problem.
The incident number for which you need to create a package.
4. Package the trace files invoking IPS.
Generate the package using the IPS PACK command and store the generated package in directory of your choice. The example below shows the package for the incident is created in The/tmp directory.
adrci> IPs pack incident 18147 In/tmp
Generated package 9 in File/tmp/ora1578_20090602113045_com_1.zip, mode complete
If at this step the Adrci utility complains the incident is flood-controlled and no package can be generated fo R it, then instead of choosing the most recent incident to be packaged, choose the "the" I incident that occurred Nstance startup.
Examples of IPS PACK include:
IPs pack Problem in/tmp
--generates the package for the problem ID in/tmp
IPs pack incident 6439 in/tmp
--generates the package for the incident ID 6439 in/tmp
IPs pack Problemkey "ORA 1578"
--generates the package for the problem with the Problem_key ' ORA 1578 '
IPs pack seconds 8
--generates the package with the incidents occurred at last 8 seconds.
IPs pack time ' 2007-05-01 10:00:00.00 ' to ' 2007-05-01 23:00:00.00 '
--generates the package with the incidents occurred between the Times ' 2007-05-01 10:00:00.00 ' and ' 2007-05-01 23:00:00.00 '
Upload the ZIP file generated to the Service Request your created on the "My Oracle Support website." This file would include all of the trace files, instance alert file and other diagnostic information for the critical error. Make sure this ZIP file is uploaded without any post processing (such as TAR).


Attached three: 11g Understanding Automatic Diagnostic Repository
What is New in 11g?
In 11g, RDBMS diagnostic data has been reorganized and is stored inside a common directory structure, the Automatic Diagno Stic Repository (ADR). An ADR are a centralized directory structure where one can find trace files, alert messages, incident dumps, core files, et C.
Automatic Diagnostic Repository (ADR):
All trace files, core files, and the alert files are now organized into directory structure comprising the Automatic Dia Gnostic Repository (ADR).
The ADR is a file-based repository for database diagnostic data. It has a unified directory structure across multiple instances and multiple products.
Beginning with release 11g, the database, Automatic Storage Management (ASM), Cluster Ready Services (CRS), and other Orac Le or components store all diagnostic data in the ADR. Each instance to each of the product stores diagnostic data underneath its own ADR home directory.
For example, the Oracle real application clusters environment with shared storage and ASM, each database instance and EA Ch ASM instance has a home directory within the ADR. ADR ' s unified directory structure, consistent diagnostic data formats across products and instances, and a unified set of Tools enable customers and Oracle Support to correlate and analyze diagnostic data across multiple.
Problems and incidents:
Problem:is a critical error in the database
eg:ora-600, ora-7445, ora-4031 etc.
Problem Key:every Problem has a Problem key, which is a-text string that includes the error code (such as ORA) and in Some cases, one or more error parameters.
Eg:?? ORA 4030?? , ?? ORA [ktfacht1-0]
Incident:is a single occurance of a problem. Each incident has a numeric incident ID.
Where is ADR located:
The location of the ADR is controlled by the Oracle "diagnostic_dest" parameter.
Path specified in the ' diagnostic_dest ' parameter defines the ADR root Directory,adr BASE.
The subdirectory inside an ADR (under the <adr_base> directory) is always named "Diag"
For example, if the ' diagnostic_dest ' and thus the <adr_base> are specified as "$ORACLE _home/log", then expect to fin d The subdirectory "$ORACLE _home/log/diag". Below this would be <adr_home>.
Any number of instances/components can share same ADR BASE. Under ADR BASE there would be individual ADR homes.
Under ADR BASE, the address of a <adr_home> 'll is similar to:
Diag/<product_type>/<prod_id>/<instance_id>.
Inside each ADR home, you can find several subdirectories, each for storing a specific type of diagnostic data. Among the subdirectories, you should is able to find TRACE, ALERT, INCIDENT, Cdump etc.
ADR Home Contents:
You'll find the following directories under ADR home-
Alert:the Alert directory contains the XML alert log
Cdump:core dumps are stored in this directory
trace:process trace files and Alert.log are stored in the trace directory. ' Background_dump_dest ' and ' user_dump_dest ' are now ignored in 11g. Now all the trace files is generated in ' Trace ' directory.
Incident:the Incident directory stores dump files created when critical errors are encountered.
Each occurrence of a critical error (incident) are given its own directory, with the incident ID incident to form the Directory name.
Metadata:the Metadata Directory stores a series of files that contain diagnostic.
Hm:the HM Directory stores reports for health checks
INCPKG, IR, LCK, Sweep:these directories contain internal framework state.
Diagnostic_dest-default Value:
IF environment variable oracle_base is set, diagnostic_dest are set to the directory designated by Oracle_base.
IF environment variable oracle_base is not set, diagnostic_dest are set to Oracle_home/log
V$diag_info:
For each database, you can query v$diag_info to check its ADR locations.
This is shows us ADR BASE, ADR home, trace file locations, XML Alert location, incident dump locations, Core dump an D Health Monitor reports.
Also gives us the default session trace (for the "current session") and number of problems, incidents reported in the DAT Abase.
ADR Command Interpreter (ADRCI):
Adrci is the command line utility using which ADR is accessed.
Enter the following command at the operating system command prompt:
%]adrci
The utility starts and displays the following prompt:
Adrci>
There are various commands that can is executed from ' adrci ' to view Alert log, trace files, incidents reported, etc.
There is no need into adrci, because the data in ADR are just for diagnostic purposes and don't intended to be secure . ADR data is secured to operating system permissions on the ADR directories.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.