packaging incidents(打包事件)
oracle 11g的一个很强有力的工具是打包事件。利用这个打包事件压缩的文件夹提交给oracle的支持来帮助解决分析问题。
一旦你创建一个事件包,将添加一个或多个相关的问题到打包文件中。其中包括trace文件,dump文件等。
缺省情况下,每一个问题的事件包仅仅包括第一个和最后三个事件。事件包包含所有可以用于诊断的事件。也可以指定事件发生的时间或数
量范围来打包。
一旦你创建了事件包,那么你能添加或移除文件。
具体步骤如下:
1:创建一个逻辑包:使用命令是ips create package。该命令可以创建一个空包,也可以能会创建自动包含诊断数据的包。这个命令有很多
变量,你可以选择创建某一特定问题号,事件号,问题关键字,或基于期间的包。
2:添加诊断数据到逻辑包:这是一个可选步骤,如果你在第一步创建的是一个空包,那么你可以使用这一步骤添加诊断文件或数据。
3:产生zip文件:可以增量添加文件到zip文件里。
我们也可以通过ADRCI工具来找到跟踪文件,如下:
adrci> show incident
ADR Home = /u01/app/oracle/diag/rdbms/huateng/huateng:
*************************************************************************
INCIDENT_ID PROBLEM_KEY CREATE_TIME
-------------------- ----------------------------------------------------------- ----------------------------------------
11041 ORA 7445 [kslgetl()+18] 2012-08-01 23:32:13.324000 +08:00
19306 ORA 1578 2012-08-06 19:28:42.011000 +08:00
19354 ORA 1578 2012-08-06 19:29:01.932000 +08:00
19355 ORA 1578 2012-08-06 19:29:09.383000 +08:00
19356 ORA 1578 2012-08-06 19:29:28.922000 +08:00
25414 ORA 600 [2252] 2012-08-07 23:25:03.801000 +08:00
25454 ORA 600 [2252] 2012-08-07 23:25:09.263000 +08:00
25462 ORA 600 [2252] 2012-08-07 23:25:10.793000 +08:00
25415 ORA 600 [2252] 2012-08-07 23:25:11.049000 +08:00
25416 ORA 600 [2252] 2012-08-07 23:25:17.087000 +08:00
34962 ORA 600 [2608] 2012-08-14 11:26:16.424000 +08:00
42163 ORA 600 [3688] 2012-08-16 05:13:34.745000 +08:00
66276 ORA 4031 2012-11-05 23:39:23.913000 +08:00
66277 ORA 4031 2012-11-05 23:44:37.593000 +08:00
66284 ORA 4031 2012-11-05 23:49:24.553000 +08:00
15 rows fetched
adrci> show trace -i 11041
Output the results to file: /tmp/utsout_9769_308617_2.ado
/u01/app/oracle/diag/rdbms/huateng/huateng/incident/incdir_11041/huateng_ora_13543_i11041.trc
----------------------------------------------------------
LEVEL PAYLOAD
----- ------------------------------------------------------------------------------------------------------------------------------------------------
Dump file /u01/app/oracle/diag/rdbms/huateng/huateng/incident/incdir_11041/huateng_ora_13543_i11041.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /u01/app/oracle/product/db11gr2
System name: Linux
Node name: db2server
Release: 2.6.18-92.el5
Version: #1 SMP Tue Jun 10 18:49:47 EDT 2008
Machine: i686
Instance name: huateng
Redo thread mounted by this instance: 1
Oracle process number: 30
Unix process pid: 13543, p_w_picpath: oracle@db2server (TNS V1-V3)
*** 2012-08-01 23:32:13.444
*** SESSION ID:(49.13) 2012-08-01 23:32:13.444
*** CLIENT ID:() 2012-08-01 23:32:13.444
*** SERVICE NAME:(SYS$USERS) 2012-08-01 23:32:13.444
*** MODULE NAME:(sqlplus@db2server (TNS V1-V3)) 2012-08-01 23:32:13.444
*** ACTION NAME:() 2012-08-01 23:32:13.444
Dump continued from file: /u01/app/oracle/diag/rdbms/huateng/huateng/trace/huateng_ora_13543.trc
1> ***** Error Stack *****
ORA-07445: exception encountered: core dump [kslgetl()+18] [SIGSEGV] [ADDR:0x600075F8] [PC:0xF052F62] [Address not mapped to object] []
1< ***** Error Stack *****
1> ***** Dump for incident 11041 (ORA 7445 [kslgetl()+18]) *****
2> ***** Beginning of Customized Incident Dump(s) *****
Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x600075F8] [PC:0xF052F62, kslgetl()+18] [flags: 0x0, count: 1]
Registers:
%eax: 0x600075f0 %ebx: 0x00000000 %ecx: 0x0f052f50
%edx: 0x00000000 %edi: 0x600075f0 %esi: 0x00000001
%esp: 0xbfa8a5f4 %ebp: 0xbfa8a604 %eip: 0x0f052f62
%efl: 0x00010282
1.使用“ips create package”创建一个新的逻辑包
1)进入到adrci命令行界面
ADRCI: Release 11.2.0.1.0 - Production on 星期二 2月 1 11:01:28 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
ADR base = "/u01/oracle"
2)尝试创建逻辑包
adrci> ips create package;
DIA-48448: This command does not support multiple ADR homes
修改adrci目录:
adrci> show homes
ADR Homes:
diag/clients/user_oracle/host_2467386799_76
diag/tnslsnr/biserver/orcl
diag/tnslsnr/biserver/listener
diag/rdbms/orcl/orcl
3)这里我们选择diag/rdbms/orcl/orcl
adrci> set homepath diag/rdbms/orcl/orcl
4)确认只有一个home
5)再次尝试创建逻辑包,成功。
adrci> ips create package;
Created package 1 without any contents, correlation level typical
6)将诊断数据添加到刚刚创建的逻辑包中
将系统中出现的53475 事件添加到逻辑包1中,在系统中可以使用show incident命令获得incident号。
adrci> ips add incident 53475 package 1;
Added incident 53475 to package 1
7)生成物理包
adrci> ips generate package 1 in /export/home/oracle
Generated package 1 in file /export/home/oracle/IPSPKG_20110201110631_COM_1.zip, mode complete
8)简单查看一下解压后的文件目录。可见Oracle在压缩包中自动采集了很多相关信息。
-bash-3.00$ unzip IPSPKG_20110201110631_COM_1.zip
Archive: IPSPKG_20110201110631_COM_1.zip
inflating: diag/rdbms/orcl/orcl/incpkg/pkg_1/seq_1/export/IPS_CONFIGURATION.dmp
inflating: diag/rdbms/orcl/orcl/incpkg/pkg_1/seq_1/export/IPS_PACKAGE.dmp
inflating: diag/rdbms/orcl/orcl/incpkg/pkg_1/seq_1/export/IPS_PACKAGE_INCIDENT.dmp
inflating: diag/rdbms/orcl/orcl/incpkg/pkg_1/seq_1/export/IPS_PACKAGE_FILE.dmp
inflating: diag/rdbms/orcl/orcl/incpkg/pkg_1/seq_1/export/IPS_PACKAGE_HISTORY.dmp
inflating: diag/rdbms/orcl/orcl/incpkg/pkg_1/seq_1/export/IPS_FILE_METADATA.dmp
inflating: diag/rdbms/orcl/orcl/incpkg/pkg_1/seq_1/export/IPS_FILE_COPY_LOG.dmp
.......
.....
5.小结
使用ADRCI (ADR Command Interface)完成整个故障打包的过程是很便利的。这既方便了自己也方便了Oracle的support人员。
让客户满意是我们工作的目标,不断超越客户的期望值来自于我们对这个行业的热爱。我们立志把好的技术通过有效、简单的方式提供给客户,将通过不懈努力成为客户在信息化领域值得信任、有价值的长期合作伙伴,公司提供的服务项目有:域名与空间、网页空间、营销软件、网站建设、乌海网站维护、网站推广。