今天测试了下11g的adrci,用来集中管理alert文件、trace文件、dump文件、健康监事报告等,确实不错
参考blog:http://blog.csdn.net/wankaiming/article/details/7798515
[code]oracle@:/export/home/oracle/app/oracle/diag/rdbms///trace$ adrci
ADRCI: Release 11.2.0.3.0 - Production on Fri Feb 14 10:40:19 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
ADR base = "/export/home/oracle/app/oracle"
adrci> show
DIA-48417: SHOW command needs arguments
adrci> help
HELP [topic]
Available Topics:
CREATE REPORT
ECHO
EXIT
HELP
HOST
IPS
PURGE
RUN
SET BASE
SET BROWSER
SET CONTROL
SET ECHO
SET EDITOR
SET HOMES | HOME | HOMEPATH
SET TERMOUT
SHOW ALERT
SHOW BASE
SHOW CONTROL
SHOW HM_RUN
SHOW HOMES | HOME | HOMEPATH
SHOW INCDIR
SHOW INCIDENT
SHOW PROBLEM
SHOW REPORT
SHOW TRACEFILE
SPOOL
There are other commands intended to be used directly by Oracle, type
"HELP EXTENDED" to see the list
adrci> SHOW INCIDENT
ADR Home = /export/home/oracle/app/oracle/diag/rdbms//:
*************************************************************************
INCIDENT_ID PROBLEM_KEY CREATE_TIME
-------------------- ----------------------------------------------------------- ----------------------------------------
674609 ORA 7445 [qctcopn()+24] 2013-06-13 14:43:36.471000 +08:00
675617 ORA 7445 [qctcopn()+24] 2013-06-13 14:46:31.096000 +08:00
677177 ORA 7445 [qctcopn()+24] 2013-06-14 00:19:58.236000 +08:00
668793 ORA 600 [qkebValidateOpn:2] 2013-06-14 00:20:18.328000 +08:00
736965 ORA 600 [kkoipt:invalid aptyp] 2013-11-19 00:24:51.790000 +08:00
734973 ORA 600 [kkoipt:invalid aptyp] 2013-11-20 00:20:33.149000 +08:00
729925 ORA 600 [kkoipt:invalid aptyp] 2013-11-20 10:08:08.290000 +08:00
734749 ORA 600 [kkoipt:invalid aptyp] 2013-11-20 12:50:19.262000 +08:00
734750 ORA 600 [kkoipt:invalid aptyp] 2013-11-20 13:08:43.490000 +08:00
730453 ORA 600 [kokegPinLob1] 2014-02-13 17:59:05.258000 +08:00
730454 ORA 600 [kokegPinLob1] 2014-02-13 18:04:03.388000 +08:00
730455 ORA 600 [kokegPinLob1] 2014-02-13 18:11:10.659000 +08:00
12 rows fetched
adrci> show alert -tail 10
2014-02-14 10:51:29.563000 +08:00
Time: 14-FEB-2014 10:51:29
Tracing not turned on.
Tns error struct:
ns main err code: 12535
TNS-12535: TNS:operation timed out
ns secondary err code: 12560
nt main err code: 505
TNS-00505: Operation timed out
nt secondary err code: 145
nt OS err code: 0
Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=135.10.50.94)(PORT=58854))
2014-02-14 10:51:48.904000 +08:00
Thread 1 advanced to log sequence 43242 (LGWR switch)
Current log# 3 seq# 43242 mem# 0: /dev/vol_ora_sys_redo3
2014-02-14 10:52:02.420000 +08:00
Archived Log entry 74303 added for thread 1 sequence 43241 ID 0x77a1673 dest 1:
adrci> show home
ADR Homes:
diag/rdbms//
adrci> show base
ADR base is "/export/home/oracle/app/oracle"
adrci> show problem
ADR Home = /export/home/oracle/app/oracle/diag/rdbms//:
*************************************************************************
PROBLEM_ID PROBLEM_KEY LAST_INCIDENT LASTINC_TIME
-------------------- ----------------------------------------------------------- -------------------- ----------------------------------------
1 ORA 7445 [qctcopn()+24] 677177 2013-06-14 00:19:58.236000 +08:00
2 ORA 600 [qkebValidateOpn:2] 668793 2013-06-14 00:20:18.328000 +08:00
3 ORA 600 [kkoipt:invalid aptyp] 734750 2013-11-20 13:08:43.490000 +08:00
4 ORA 600 [kokegPinLob1] 730455 2014-02-13 18:11:10.659000 +08:00
4 rows fetched
adrci> help ips
HELP IPS [topic]
Available Topics:
ADD
ADD FILE
ADD NEW INCIDENTS
CHECK REMOTE KEYS
COPY IN FILE
COPY OUT FILE
CREATE PACKAGE
DELETE PACKAGE
FINALIZE PACKAGE
GENERATE PACKAGE
GET MANIFEST
GET METADATA
GET REMOTE KEYS
PACK
REMOVE
REMOVE FILE
SET CONFIGURATION
SHOW CONFIGURATION
SHOW FILES
SHOW INCIDENTS
SHOW PACKAGE
UNPACK FILE
UNPACK PACKAGE
USE REMOTE KEYS
adrci> ips pack problem 4
Generated package 3 in file /export/home/oracle/app/oracle/diag/rdbms///trace/ORA600kok_20140214110826_COM_1.zip, mode complete
adrci> SHOW INCIDENT
ADR Home = /export/home/oracle/app/oracle/diag/rdbms//:
*************************************************************************
INCIDENT_ID PROBLEM_KEY CREATE_TIME
-------------------- ----------------------------------------------------------- ----------------------------------------
674609 ORA 7445 [qctcopn()+24] 2013-06-13 14:43:36.471000 +08:00
675617 ORA 7445 [qctcopn()+24] 2013-06-13 14:46:31.096000 +08:00
677177 ORA 7445 [qctcopn()+24] 2013-06-14 00:19:58.236000 +08:00
668793 ORA 600 [qkebValidateOpn:2] 2013-06-14 00:20:18.328000 +08:00
736965 ORA 600 [kkoipt:invalid aptyp] 2013-11-19 00:24:51.790000 +08:00
734973 ORA 600 [kkoipt:invalid aptyp] 2013-11-20 00:20:33.149000 +08:00
729925 ORA 600 [kkoipt:invalid aptyp] 2013-11-20 10:08:08.290000 +08:00
734749 ORA 600 [kkoipt:invalid aptyp] 2013-11-20 12:50:19.262000 +08:00
734750 ORA 600 [kkoipt:invalid aptyp] 2013-11-20 13:08:43.490000 +08:00
730453 ORA 600 [kokegPinLob1] 2014-02-13 17:59:05.258000 +08:00
730454 ORA 600 [kokegPinLob1] 2014-02-13 18:04:03.388000 +08:00
730455 ORA 600 [kokegPinLob1] 2014-02-13 18:11:10.659000 +08:00
12 rows fetched
adrci> ips create package INCIDENT_ID 730455
DIA-48415: Syntax error found in string [ips create package INCIDENT_ID ] at column [31]
adrci> ips pack INCIDENT_ID 730455
DIA-48415: Syntax error found in string [ips pack INCIDENT_ID ] at column [21]
adrci> help ips pack
Usage: IPS PACK
[INCIDENT <incid> | PROBLEM <prob_id> | PROBLEMKEY <prob_key> |
SECONDS <seconds> | TIME <start_time> TO <end_time>]
[CORRELATE BASIC | TYPICAL | ALL]
[IN <path>]
Purpose: Create a package, and immediately generate the physical package.
Arguments:
<incid>: ID of incident to use for selecting package contents.
<prob_id>: ID of problem to use for selecting package contents.
<prob_key>: Problem key to use for selecting package contents.
<seconds>: Number of seconds before now for selecting package contents.
<start_time>: Start of time range to look for incidents in.
<end_time>: End of time range to look for incidents in.
<path>: Path where the physical package file should be generated.
Options:
CORRELATE BASIC: The package will include the incident dumps, and the
incident process trace files.
Additional incidents can be included automatically,
if they share relevant correlation keys.
CORRELATE TYPICAL: The package will include the incident dumps, and all
trace files that were modified in a time window around
each incident.
Additional incidents can be included automatically,
if they share relevant correlation keys, or occurred
in a time window around the main incidents.
CORRELATE ALL: The package will include the incident dumps, and all
trace files that were modified between the first
selected incident and the last selected incident.
Additional incidents can be included automatically,
if they occurred in the same time range.
Notes:
If no package contents are specified (incident, problem, etc), an empty
package will be created. Files and incidents can be added later.
If no correlation level is specified, the default level is used.
The default is normally TYPICAL, but it can be changed using the command
IPS SET CONFIGURATION.
Example:
ips pack incident 861;
ips pack time '2006-12-31 23:59:59.00 -07:00' to
'2007-01-01 01:01:01.00 -07:00';
adrci> ips create package INCIDENT 730455
Created package 4 based on incident id 730455, correlation level typical
adrci> ips generate package 4
Generated package 4 in file /export/home/oracle/app/oracle/diag/rdbms///trace/ORA600kok_20140214111628_COM_1.zip, mode complete
adrci> exit
oracle@:/export/home/oracle/app/oracle/diag/rdbms///trace$ ls ORA600*
ORA600kok_20140214110826_COM_1.zip ORA600kok_20140214111628_COM_1.zip
oracle@:/export/home/oracle/app/oracle/diag/rdbms///trace$ ls -l ORA600*
-rw-r--r-- 1 oracle dba 7033235 Feb 14 11:11 ORA600kok_20140214110826_COM_1.zip
-rw-r--r-- 1 oracle dba 14162354 Feb 14 11:20 ORA600kok_20140214111628_COM_1.zip
oracle@:/export/home/oracle/app/oracle/diag/rdbms///trace$[/code]
参考blog:http://blog.csdn.net/wankaiming/article/details/7798515
[code]oracle@:/export/home/oracle/app/oracle/diag/rdbms///trace$ adrci
ADRCI: Release 11.2.0.3.0 - Production on Fri Feb 14 10:40:19 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
ADR base = "/export/home/oracle/app/oracle"
adrci> show
DIA-48417: SHOW command needs arguments
adrci> help
HELP [topic]
Available Topics:
CREATE REPORT
ECHO
EXIT
HELP
HOST
IPS
PURGE
RUN
SET BASE
SET BROWSER
SET CONTROL
SET ECHO
SET EDITOR
SET HOMES | HOME | HOMEPATH
SET TERMOUT
SHOW ALERT
SHOW BASE
SHOW CONTROL
SHOW HM_RUN
SHOW HOMES | HOME | HOMEPATH
SHOW INCDIR
SHOW INCIDENT
SHOW PROBLEM
SHOW REPORT
SHOW TRACEFILE
SPOOL
There are other commands intended to be used directly by Oracle, type
"HELP EXTENDED" to see the list
adrci> SHOW INCIDENT
ADR Home = /export/home/oracle/app/oracle/diag/rdbms//:
*************************************************************************
INCIDENT_ID PROBLEM_KEY CREATE_TIME
-------------------- ----------------------------------------------------------- ----------------------------------------
674609 ORA 7445 [qctcopn()+24] 2013-06-13 14:43:36.471000 +08:00
675617 ORA 7445 [qctcopn()+24] 2013-06-13 14:46:31.096000 +08:00
677177 ORA 7445 [qctcopn()+24] 2013-06-14 00:19:58.236000 +08:00
668793 ORA 600 [qkebValidateOpn:2] 2013-06-14 00:20:18.328000 +08:00
736965 ORA 600 [kkoipt:invalid aptyp] 2013-11-19 00:24:51.790000 +08:00
734973 ORA 600 [kkoipt:invalid aptyp] 2013-11-20 00:20:33.149000 +08:00
729925 ORA 600 [kkoipt:invalid aptyp] 2013-11-20 10:08:08.290000 +08:00
734749 ORA 600 [kkoipt:invalid aptyp] 2013-11-20 12:50:19.262000 +08:00
734750 ORA 600 [kkoipt:invalid aptyp] 2013-11-20 13:08:43.490000 +08:00
730453 ORA 600 [kokegPinLob1] 2014-02-13 17:59:05.258000 +08:00
730454 ORA 600 [kokegPinLob1] 2014-02-13 18:04:03.388000 +08:00
730455 ORA 600 [kokegPinLob1] 2014-02-13 18:11:10.659000 +08:00
12 rows fetched
adrci> show alert -tail 10
2014-02-14 10:51:29.563000 +08:00
Time: 14-FEB-2014 10:51:29
Tracing not turned on.
Tns error struct:
ns main err code: 12535
TNS-12535: TNS:operation timed out
ns secondary err code: 12560
nt main err code: 505
TNS-00505: Operation timed out
nt secondary err code: 145
nt OS err code: 0
Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=135.10.50.94)(PORT=58854))
2014-02-14 10:51:48.904000 +08:00
Thread 1 advanced to log sequence 43242 (LGWR switch)
Current log# 3 seq# 43242 mem# 0: /dev/vol_ora_sys_redo3
2014-02-14 10:52:02.420000 +08:00
Archived Log entry 74303 added for thread 1 sequence 43241 ID 0x77a1673 dest 1:
adrci> show home
ADR Homes:
diag/rdbms//
adrci> show base
ADR base is "/export/home/oracle/app/oracle"
adrci> show problem
ADR Home = /export/home/oracle/app/oracle/diag/rdbms//:
*************************************************************************
PROBLEM_ID PROBLEM_KEY LAST_INCIDENT LASTINC_TIME
-------------------- ----------------------------------------------------------- -------------------- ----------------------------------------
1 ORA 7445 [qctcopn()+24] 677177 2013-06-14 00:19:58.236000 +08:00
2 ORA 600 [qkebValidateOpn:2] 668793 2013-06-14 00:20:18.328000 +08:00
3 ORA 600 [kkoipt:invalid aptyp] 734750 2013-11-20 13:08:43.490000 +08:00
4 ORA 600 [kokegPinLob1] 730455 2014-02-13 18:11:10.659000 +08:00
4 rows fetched
adrci> help ips
HELP IPS [topic]
Available Topics:
ADD
ADD FILE
ADD NEW INCIDENTS
CHECK REMOTE KEYS
COPY IN FILE
COPY OUT FILE
CREATE PACKAGE
DELETE PACKAGE
FINALIZE PACKAGE
GENERATE PACKAGE
GET MANIFEST
GET METADATA
GET REMOTE KEYS
PACK
REMOVE
REMOVE FILE
SET CONFIGURATION
SHOW CONFIGURATION
SHOW FILES
SHOW INCIDENTS
SHOW PACKAGE
UNPACK FILE
UNPACK PACKAGE
USE REMOTE KEYS
adrci> ips pack problem 4
Generated package 3 in file /export/home/oracle/app/oracle/diag/rdbms///trace/ORA600kok_20140214110826_COM_1.zip, mode complete
adrci> SHOW INCIDENT
ADR Home = /export/home/oracle/app/oracle/diag/rdbms//:
*************************************************************************
INCIDENT_ID PROBLEM_KEY CREATE_TIME
-------------------- ----------------------------------------------------------- ----------------------------------------
674609 ORA 7445 [qctcopn()+24] 2013-06-13 14:43:36.471000 +08:00
675617 ORA 7445 [qctcopn()+24] 2013-06-13 14:46:31.096000 +08:00
677177 ORA 7445 [qctcopn()+24] 2013-06-14 00:19:58.236000 +08:00
668793 ORA 600 [qkebValidateOpn:2] 2013-06-14 00:20:18.328000 +08:00
736965 ORA 600 [kkoipt:invalid aptyp] 2013-11-19 00:24:51.790000 +08:00
734973 ORA 600 [kkoipt:invalid aptyp] 2013-11-20 00:20:33.149000 +08:00
729925 ORA 600 [kkoipt:invalid aptyp] 2013-11-20 10:08:08.290000 +08:00
734749 ORA 600 [kkoipt:invalid aptyp] 2013-11-20 12:50:19.262000 +08:00
734750 ORA 600 [kkoipt:invalid aptyp] 2013-11-20 13:08:43.490000 +08:00
730453 ORA 600 [kokegPinLob1] 2014-02-13 17:59:05.258000 +08:00
730454 ORA 600 [kokegPinLob1] 2014-02-13 18:04:03.388000 +08:00
730455 ORA 600 [kokegPinLob1] 2014-02-13 18:11:10.659000 +08:00
12 rows fetched
adrci> ips create package INCIDENT_ID 730455
DIA-48415: Syntax error found in string [ips create package INCIDENT_ID ] at column [31]
adrci> ips pack INCIDENT_ID 730455
DIA-48415: Syntax error found in string [ips pack INCIDENT_ID ] at column [21]
adrci> help ips pack
Usage: IPS PACK
[INCIDENT <incid> | PROBLEM <prob_id> | PROBLEMKEY <prob_key> |
SECONDS <seconds> | TIME <start_time> TO <end_time>]
[CORRELATE BASIC | TYPICAL | ALL]
[IN <path>]
Purpose: Create a package, and immediately generate the physical package.
Arguments:
<incid>: ID of incident to use for selecting package contents.
<prob_id>: ID of problem to use for selecting package contents.
<prob_key>: Problem key to use for selecting package contents.
<seconds>: Number of seconds before now for selecting package contents.
<start_time>: Start of time range to look for incidents in.
<end_time>: End of time range to look for incidents in.
<path>: Path where the physical package file should be generated.
Options:
CORRELATE BASIC: The package will include the incident dumps, and the
incident process trace files.
Additional incidents can be included automatically,
if they share relevant correlation keys.
CORRELATE TYPICAL: The package will include the incident dumps, and all
trace files that were modified in a time window around
each incident.
Additional incidents can be included automatically,
if they share relevant correlation keys, or occurred
in a time window around the main incidents.
CORRELATE ALL: The package will include the incident dumps, and all
trace files that were modified between the first
selected incident and the last selected incident.
Additional incidents can be included automatically,
if they occurred in the same time range.
Notes:
If no package contents are specified (incident, problem, etc), an empty
package will be created. Files and incidents can be added later.
If no correlation level is specified, the default level is used.
The default is normally TYPICAL, but it can be changed using the command
IPS SET CONFIGURATION.
Example:
ips pack incident 861;
ips pack time '2006-12-31 23:59:59.00 -07:00' to
'2007-01-01 01:01:01.00 -07:00';
adrci> ips create package INCIDENT 730455
Created package 4 based on incident id 730455, correlation level typical
adrci> ips generate package 4
Generated package 4 in file /export/home/oracle/app/oracle/diag/rdbms///trace/ORA600kok_20140214111628_COM_1.zip, mode complete
adrci> exit
oracle@:/export/home/oracle/app/oracle/diag/rdbms///trace$ ls ORA600*
ORA600kok_20140214110826_COM_1.zip ORA600kok_20140214111628_COM_1.zip
oracle@:/export/home/oracle/app/oracle/diag/rdbms///trace$ ls -l ORA600*
-rw-r--r-- 1 oracle dba 7033235 Feb 14 11:11 ORA600kok_20140214110826_COM_1.zip
-rw-r--r-- 1 oracle dba 14162354 Feb 14 11:20 ORA600kok_20140214111628_COM_1.zip
oracle@:/export/home/oracle/app/oracle/diag/rdbms///trace$[/code]
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。
评论
相关阅读
【专家有话说第五期】在不同年龄段,DBA应该怎样规划自己的职业发展?
墨天轮编辑部
1320次阅读
2025-03-13 11:40:53
Oracle RAC ASM 磁盘组满了,无法扩容怎么在线处理?
Lucifer三思而后行
790次阅读
2025-03-17 11:33:53
Oracle+Deepseek+Dify 实现数据库数据实时分析
bicewow
721次阅读
2025-03-06 09:41:49
【ORACLE】ORACLE19C在19.13版本前的一个严重BUG-24761824
DarkAthena
577次阅读
2025-03-04 14:33:31
Oracle避坑指南|同名表导出难题:如何精准排除指定用户下的表?
szrsu
541次阅读
2025-03-05 00:42:34
2月“墨力原创作者计划”获奖名单公布
墨天轮编辑部
462次阅读
2025-03-13 14:38:19
Ogg23ai高手必看-MySQL Innodb Cluster跟oracle的亲密接触
曹海峰
461次阅读
2025-03-04 21:56:13
【ORACLE】char类型和sql优化器发生的“错误”反应
DarkAthena
411次阅读
2025-03-04 23:05:01
Oracle 如何修改 db_unique_name?强迫症福音!
Lucifer三思而后行
351次阅读
2025-03-12 21:27:56
Oracle DataGuard高可用性解决方案详解
孙莹
314次阅读
2025-03-26 23:27:33