转载:http://blog.csdn.net/zhou1862324/article/details/17512191

IPS(incident packaging service)是11G的新特性,其目的是查看某个错误相关的所有dump文件和trace文件,并可以很方便的打成一个包,我认为这个特性极大的方便了DBA进行远程诊断。
PRE:使用前首先设置好ORACLE_HOME和PATH环境变量。
进入adrci控制台:
$adrci
adrci tool is started.
列出ADR HOME:
adrci> show home
diag/rdbms/v11/V11 
设置ADRhome path:
adrci> set homepath diag/rdbms/v11/V11
列出problem:
adrci> show problem
--将会列出ORA-600, ORA-7445, ORA-1578,并伴随PROBLEM_ID , Problem_key和错误发生日期。
把错误trace文件打包
adrci> ips pack problem <problem id> in /tmp
--该操作根据PROBLEM_ID将错误相关的trc文件打包到/tmp.

附一: ADR How to Package Diagnostic Information in 11g

Invoke adrci and set ADR_HOME.
You can create a logical package based on an incident number, a problem number, a problem key, or a time interval. Create a logical package such that it will be most useful to diagnose the error of your concern.
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 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. 
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.) 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. 
IV) 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. 
V)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 :
You 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, 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/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 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.

附二:Database 11g: Quick Steps to Package and Send Critical Error Diagnostic Information to Support :
Oracle11g provides tools and methods to automatically identify and gather trace files related to a problem (a critical error in the database environment) or an incident (an occurrence of a problem). This facility is known as the Incident Packaging Services (IPS). The Support Workbench (GUI) and ADRCI (command line) utilities are the two interfaces to the Incident Packaging Services. Every occurrence of a critical error (problem) in the database creates an incident.
Steps in identifying and sending files to support.
1. You 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 will list all the ADR homes. Set the proper database ADR home for use 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 an 'incident'. The instance alert file will show all the incidents reported. Each incident will be associated with a unique incident id in the ADR.
From the ADRCI prompt, execute the SHOW INCIDENT command for the problem to be 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 see multiple incidents reported for the same problem.
Note 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 a directory of your choice. The example below shows the package for the incident will be 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 that the incident was flood-controlled and that no package can be generated for it, then instead of choosing the most recent incident to be packaged, choose the first incident that occurred after an instance startup.
Examples of IPS PACK include:
ips pack problem 100 in /tmp
--Generates the package for the problem id 100 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 in 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 you created on the My Oracle Support website . This file will include all the trace files, instance alert file and other diagnostic information for the critical error. Make sure that the ZIP file is uploaded WITHOUT any post processing (such as TAR).

附三: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 Diagnostic Repository (ADR). An ADR is a centralized directory structure where one can find trace files, alert messages, incident dumps, core files, etc. 
Automatic Diagnostic Repository ( ADR ) : 
All trace files, core files, and the alert files are now organized into a directory structure comprising the Automatic Diagnostic 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 Oracle products or components store all diagnostic data in the ADR. Each instance of each product stores diagnostic data underneath its own ADR home directory. 
For example, in an Oracle Real Application Clusters environment with shared storage and ASM, each database instance and each 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 instances.
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 an error code (such as ORA 600) and in some cases, one or more error parameters. 
Eg: ??ORA 4030?? , ??ORA 600 [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 first subdirectory inside an ADR (under the <adr_base> directory) is always named "diag"
For example, if the 'diagnostic_dest' and thus the <adr_base> is specified as "$ORACLE_HOME/log", then expect to find the subdirectory "$ORACLE_HOME/log/diag". Below this will be <adr_home> . 
Any number of instances/components can share same ADR BASE. Under ADR BASE there will be individual ADR HOMES. 
Under ADR BASE ,the address of an <adr_home> will be 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 be able to find TRACE, ALERT, INCIDENT, CDUMP etc. 
ADR HOME contents : 
You will 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 will be generated in 'trace' directory. 
Incident : The incident directory stores dump files created when critical errors are encountered. 
Each occurrence of a critical error( incident ) is given its own incident directory, with the incident ID used to form the directory name. 
Metadata : The metadata directory stores a series of files that contain diagnostic metadata. 
HM : The hm directory stores reports for health checks 
Incpkg, ir, lck, sweep : These directories contain internal diagnosability framework state. 
DIAGNOSTIC_DEST - Default value : 
If environment variable ORACLE_BASE is set, DIAGNOSTIC_DEST is set to the directory designated by ORACLE_BASE. 
If environment variable ORACLE_BASE is not set, DIAGNOSTIC_DEST is set to ORACLE_HOME/log
V$DIAG_INFO : 
For each database , you can query v$diag_info to check its ADR locations. 
This shows us the ADR BASE , ADR home , trace file locations , XML Alert location , incident dump locations , core dump and health monitor reports. 
Also gives us the default session trace ( for the current session ) and number of problems , incidents reported in the database. 
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 be executed from 'adrci' to view Alert log , trace files , incidents reported , etc.
There is no need to log in to ADRCI, because the data in ADR is just for diagnostic purposes and not intended to be secure. ADR data is secured only by operating system permissions on the ADR directories.

IPS简单使用方法的更多相关文章

  1. MySQL笔记-最简单的方法来解决找不到mysqld.sock文件的问题

    首先,环境:ubuntu 14.04,采用apt-get的方式安装的,手动安装可能路径设置稍有区别. 1.安装MySQL后,用命令行首次启动时发现找不到Mysqld.sock文件,提示: ERROR ...

  2. mfc显示静态图片最简单的方法

    一致都是研究如何调用opencv显示动态图片,但是很多时候在显示图标的时候,都是需要显示静态图片,现在将最简单的方法总结下: 1.添加picture控件 2.添加资源,要求为bmp 3.修改属性 结果 ...

  3. ECshop设置301最快捷最简单的方法

    ECshop设置301最快捷最简单的方法 在 init.php中加入以下代码 if (strtolower($_SERVER['SERVER_NAME'])!='www.fz1688.com') { ...

  4. git 的简单使用方法

    git 的简单使用方法1. 服务器 安装完成2. ssh 中的账号创建完成3. 创建 ssh 账号,会在 ssh 的安装目录下的home 目录里面,多了用户家目录4. 进入该目录 ,创建一个新的文件夹 ...

  5. JavaScript,一个超级简单的方法判断浏览器的内核前缀

    先说明,此处的方法是说超级简单的方法,不是指代码超级少,而是用非常简单的知识点,只要懂得怎么写JavaScript的行内样式就可以判断. 大家应该还记得JavaScript行内样式怎么写吧?(看来我是 ...

  6. NET MVC1项目升级到MVC2最简单的方法

    NET MVC1项目升级到MVC2最简单的方法 把MVC1项目升级到MVC2,最简单的做法如下: 新建MVC2项目 新建一个MVC2项目,把原来MVC1的项目文件全部拷贝到新建MVC2项目目录里,依照 ...

  7. js 获取当天23点59分59秒 时间戳 (最简单的方法)

    js 获取当天23点59分59秒 时间戳 (最简单的方法) new Date(new Date(new Date().toLocaleDateString()).getTime()+24*60*60* ...

  8. [ASP.NET]更简单的方法:FormsAuthentication登录ReturnUrl使用绝对路径

    转自:http://www.cnblogs.com/dudu/p/formsauthentication-returnurl-absoluteuri.html [ASP.NET]更简单的方法:Form ...

  9. ASP.Net MVC_DotNetZip简单使用方法,解决文件压缩的问题[转]

    准备工作: 在vs工具栏中找到NuGet   下载DotNetZip   现在就可以使用DotNetZip强大的类库了,在这里我给出一些简单的使用. ? 1 2 3 4 5 6 7 8 9 10 11 ...

随机推荐

  1. springboot最新版本自定义日志注解和AOP

    LogAspectAnnotation @ControllerLogAspectAnnotation /** * * Define a log facet annotation * @author s ...

  2. Laravel 系列入门教程(五)【最适合中国人的 Laravel 教程】

    本文是本系列教程的完结篇,我们将一起给 Article 加入评论功能,让游客在前台页面可以查看.提交.回复评论,并完成后台评论管理功能,可以删除.编辑评论.Article 和评论将使用 Laravel ...

  3. laravel compact的用法

    向视图中传递变量 我们在开发web应用当中,通常都不是为了写静态页面而生的,我们需要跟数据打交道,那么这个时候,问题就来了,在一个MVC的框架中,怎么将数据传给视图呢?比如我们要在 ArticleCo ...

  4. 微信小程序之封装http请求

    下面将封装http请求服务部分的服务以及引用部分 // 本服务用于封装请求 // 返回的是一个promisepromise var sendRrquest = function (url, metho ...

  5. 年会抽奖 抽奖系统 抽奖软件 C# Winform

    年会抽奖软件: Q.Q 358189777 C#.  数据库Access: 1.系统启动,自动全屏展示. 2.背景随心切换. 3.快捷键方便自如: F1:弹出设置界面 F2:查询人员名单.中奖名单 F ...

  6. Web前端开发必备

    前端学习相关书籍 关于书籍 HTML.CSS 类别书籍,都是大同小异,在当当网.卓越网搜索一下很多推荐.如果感觉学的差不多了,可以关注一下<CSS禅意花园>,这个很有影响力. Javasc ...

  7. 【Wyn Enterprise BI知识库】 什么是商业智能 ZT

    商业智能(Business Intelligence,BI),又称商务智能,指用现代数据仓库技术.在线分析处理技术.数据挖掘和数据展现技术进行数据分析以实现商业价值. 图1:商业智能(BI)系统 商业 ...

  8. arcgis在折点处打断并建立网络分析(最短路径等问题)

    目的:GIS网络分析用于对段路径等问题.这里仅仅讲述如何建立网络分析. 网络建立前必须满足以下条件 1.要素文件在节点处打断(本文下面会叙述) 2.要素文件在地理数据库里的数据集里(一般是这样) 3. ...

  9. Cartfile学习参考博客

    1.http://www.cnblogs.com/xuruofan/p/6000864.html 2.http://www.jianshu.com/p/5ccde5f22a17

  10. Android为TV端助力 handler ,message消息发送方式

    1.Message msg =  Message.obtain(mainHandler) msg.obj=obj;//添加你需要附加上去的内容 msg.what = what;//what消息处理的类 ...