Oracle工具——ADRCI(一)
ADRCI工具是Oracle11g才推出的新工具,主要用來管理alert檔案、trace檔案、dump檔案、健康監事報告等。
這一篇簡單介紹ADRCI工具。
用過11g的人都會發現,11g中alert檔案以及trace檔案的存放位置都發生了變化。從原來的ORACLE_BASE/admin/INSTANCE_NAME目錄變成了ORACLE_BASE/diag/rdbms/DBNAME/INSTANCE_NAME目錄。
Oracle之所以修改了這個跨越多個版本都沒有修改過的引數設定,就是因為Oracle在11g中推出了ADRCI。這個工具可以統一管理ASM例項和多個資料庫例項的alert檔案、後臺trace檔案、使用者trace檔案,dump檔案等等。
而且這個工具可以快速查詢錯誤相關的所有trace檔案,並將這些檔案打包到一個zip檔案,以便將問題相關的資訊提供給Oracle的技術支援。
看一下ADRCI工具的簡單命令:
C:\Documents and Settings\ytk>adrci
ADRCI: Release 11.1.0.6.0 - Beta on 星期日 3月 29 21:23:57 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
ADR base = "e:\oracle"
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
HELP列出了ADRCI工具的所有命令,還可以透過HELP加個別命令的方式來列出這個命令的具體語法,比如:
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
UNPACK FILE
USE REMOTE KEYS
adrci> HELP IPS ADD
Usage: IPS ADD
[INCIDENT
SECONDS
PACKAGE
Purpose: Add incidents to an existing package.
Arguments:
Example:
ips add incident 22 package 12
adrci> HELP SHOW PROBLEM
Usage: SHOW PROBLEM [-p
[-last
[-orderby (field1, field2, ...) [ASC|DSC]]
Purpose: Show the problem information. By default, this command will
only show the last 50 problems.
Options:
[-p
The field names that users can specify in the predicate are:
PROBLEM_ID number
PROBLEM_KEY text(550)
FIRST_INCIDENT number
FIRSTINC_TIME timestamp
LAST_INCIDENT number
LASTINC_TIME timestamp
IMPACT1 number
IMPACT2 number
IMPACT3 number
IMPACT4 number
SERVICE_REQUEST text(64)
BUG_NUMBER text(64)
[-last
the last
qualified problems. If this option is not specified, this command
will only show 50 incidents.
[-orderby (field1, field2, ...) [ASC|DSC]]: If specified, the results
will be ordered by the specified fields' values. By default, it will be
in the ascending order unless "DSC" is specified. Note that the field
names that can be specified here are from the "PROBLEM" relation.
Examples:
show problem
show problem -p "problem_id>123"
下面是查詢資料庫中錯誤的幾個小例子:
adrci> show base
ADR base is "e:\oracle"
adrci> show home
ADR Homes:
diag\clients\user_system\host_3414944083_11
diag\clients\user_unknown\host_3414944083_11
diag\clients\user_unknown\host_411310321_11
diag\clients\user_ytk\host_3414944083_11
diag\rdbms\ytk1110\ytk1110
diag\tnslsnr\ytk-thinkpad\listener
adrci> set home diag\rdbms\ytk1110\ytk1110
adrci> show alert -tail 5
2009-02-25 22:51:17.640000 +08:00
Completed: alter database open
2009-02-25 22:55:26.171000 +08:00
Starting background process CJQ0
CJQ0 started with pid=7, OS id=14428
2009-02-25 22:55:49.796000 +08:00
Errors in file e:\oracle\diag\rdbms\ytk1110\ytk1110\trace\ytk1110_j008_15220.trc
:
ORA-12012: 自動執行作業 11689 出錯
ORA-01403: 未找到任何資料
2009-02-25 23:20:39.828000 +08:00
Thread 1 advanced to log sequence 75
Current log# 3 seq# 75 mem# 0: E:\ORACLE\ORADATA\YTK111\REDO03.LOG
2009-02-26 08:31:51.296000 +08:00
***********************************************************************
Fatal NI connect error 12638, connecting to:
(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
VERSION INFORMATION:
TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 11.1.0.6.0 - Pro
duction
Time: 26-2月 -2009 08:31:51
Tracing not turned on.
Tns error struct:
ns main err code: 12638
TNS-12638: 身份證明檢索失敗
ns secondary err code: 0
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0
除了上面互動式的方式外,還可以呼叫指令碼,或者指定一系列命令來批次執行命令:
C:\Documents and Settings\ytk>adrci -help
Syntax:
adrci [-help] [script=script_filename]
[exec = "one_command [;one_command;...]"]
Options Description (Default)
-----------------------------------------------------------------
script script. file name (None)
help help on the command options (None)
exec exec a set of commands (None)
-----------------------------------------------------------------
比如:
C:\Documents and Settings\ytk>adrci exec="show base;show home;set home diag\\rdb
ms\\ytk1110\\ytk1110;show home"
ADR base is "e:\oracle"
ADR Homes:
diag\clients\user_system\host_3414944083_11
diag\clients\user_unknown\host_3414944083_11
diag\clients\user_unknown\host_411310321_11
diag\clients\user_ytk\host_3414944083_11
diag\rdbms\ytk1110\ytk1110
diag\tnslsnr\ytk-thinkpad\listener
ADR Homes:
diag\rdbms\ytk1110\ytk1110
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/4227/viewspace-580571/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle工具——ADRCI(三)Oracle
- Oracle工具——ADRCI(二)Oracle
- Oracle 11g ADRCI工具使用Oracle
- oracle 11g adrci 工具使用方法Oracle
- 【ADRCI】使用ADRCI (ADR Command Interpreter) 工具檢視Oracle alert警告日誌Oracle
- oracle 11g adrci使用Oracle
- 用oracle的ADRCI功能檢視日誌Oracle
- ORACLE:使用ADRCI顯示意外事件Oracle事件
- ADRCI命令
- adrci 命令
- 使用Oracle 11g的adrci的ips打包一個incidentOracleIDE
- ADRCI工具的SHOW ALERT TAIL返回過多的結果AI
- Windows下用命令列工具ADRCI跟蹤日誌檔案Windows命令列
- ADRCI基礎知識
- Automatic Diagnostic Repository (ADR) in Oracle Database 11g Release 1 (ADRCI)OracleDatabase
- Oracle11g 中使用ADRCI 檢視alert log檔案(xml格式)OracleXML
- Oracle備份之RMAN工具(一)Oracle
- Oracle bbed一鍵安裝工具分享Oracle
- 11g ADRCI清理trace檔案
- 使用11G 的ADRCI 清除trace檔案
- oracle的字符集檢查工具CSSCAN(一)OracleCSS
- 一些第三方oracle工具Oracle
- 【11g】使用ADRCI工具的“show alert”命令快速檢索出alert中所有“ORA-”錯誤資訊
- Oracle工具——csscanOracleCSS
- Oracle工具——WRAPOracle
- Oracle工具——ORAPWDOracle
- Oracle工具——DBVERIFYOracle
- Oracle工具(Oracle Tools) – SQLT(SQLTXPLAIN)OracleSQLAI
- oracle unwrap解密工具Oracle解密
- oracle工具 awr formatOracleORM
- Oracle CSSCAN工具使用OracleCSS
- ORACLE 跟蹤工具Oracle
- Oracle 工具匯總Oracle
- Oracle Clusterware工具集Oracle
- Oracle工具——DBNEWIDOracle
- 啟動BIEE報錯--adrci.exe已停止工作
- 【Oracle】一款非常好用的trace檔案分析工具之一Oracle
- 無工具情況下Oracle應急診斷思路(一)Oracle