【ADRCI】使用ADRCI (ADR Command Interpreter) 工具檢視Oracle alert警告日誌
在Oracle的11g版本中,alert檔案的位置發生了變化,與此同時Oracle提供了一個命令列工具ADRCI,它可以很便利的檢視資料庫中出現的異常。 透過這個小文兒給大家展示一下使用ADRCI (ADR Command Interface) 在11g中檢視Oracle的警告日誌的方法。
1.進入到adrci命令列模式
ora11g@RHEL53 /home/oracle$ which adrci
/oracle/u01/app/oracle/product/1101/db/bin/adrci
ora11g@RHEL53 /home/oracle$ 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)
------------------------------------------------------
ora11g@RHEL53 /home/oracle$ adrci
ADRCI: Release 11.1.0.6.0 - Beta on Fri Feb 27 15:23:52 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
ADR base = "/oracle/u01/app/oracle"
adrci>
2.使用 help show alert 命令檢視幫助文件
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> help show alert
Usage: SHOW ALERT [-p <predicate_string>] [-term]
[ [-tail [num] [-f]] | [-file <alert_file_name>] ]
Purpose: Show alert messages.
Options:
[-p <predicate_string>]: The predicate string must be double quoted.
The fields in the predicate are the fields:
ORIGINATING_TIMESTAMP timestamp
NORMALIZED_TIMESTAMP timestamp
ORGANIZATION_ID text(65)
COMPONENT_ID text(65)
HOST_ID text(65)
HOST_ADDRESS text(17)
MESSAGE_TYPE number
MESSAGE_LEVEL number
MESSAGE_ID text(65)
MESSAGE_GROUP text(65)
CLIENT_ID text(65)
MODULE_ID text(65)
PROCESS_ID text(33)
THREAD_ID text(65)
USER_ID text(65)
INSTANCE_ID text(65)
DETAILED_LOCATION text(161)
UPSTREAM_COMP_ID text(101)
DOWNSTREAM_COMP_ID text(101)
EXECUTION_CONTEXT_ID text(101)
EXECUTION_CONTEXT_SEQUENCE number
ERROR_INSTANCE_ID number
ERROR_INSTANCE_SEQUENCE number
MESSAGE_TEXT text(2049)
MESSAGE_ARGUMENTS text(129)
SUPPLEMENTAL_ATTRIBUTES text(129)
SUPPLEMENTAL_DETAILS text(129)
PROBLEM_KEY text(65)
[-tail [num] [-f]]: Output last part of the alert messages and
output latest messages as the alert log grows. If num is not specified,
the last 10 messages are displayed. If "-f" is specified, new data
will append at the end as new alert messages are generated.
[-term]: Direct results to terminal. If this option is not specified,
the results will be open in an editor.
By default, it will open in emacs, but "set editor" can be used
to set other editors.
[-file <alert_file_name>]: Allow users to specify an alert file which
may not be in ADR. <alert_file_name> must be specified with full path.
Note that this option cannot be used with the -tail option
Examples:
show alert
show alert -p "message_text like '%incident%'"
show alert -tail 20
adrci>
3.使用 show alert 列出各個目錄下的日誌目錄,輸入編號4,系統會自動呼叫vi編輯器檢視資料庫的alert日誌
adrci> show alert
Choose the alert log from the following homes to view:
1: diag/tnslsnr/RHEL53/listener
2: diag/clients/user_unknown/host_411310321_11
3: diag/clients/user_oracle/host_2175824367_11
4: diag/rdbms/ora11g/ora11g
Q: to quit
Please select option:4
4.另外一種檢視方式是,指定具體的 homepath 然後使用“show alert -tail 15”檢視對應日誌檔案的後15行
adrci> show homepath
ADR Homes:
diag/tnslsnr/RHEL53/listener
diag/clients/user_unknown/host_411310321_11
diag/clients/user_oracle/host_2175824367_11
diag/rdbms/ora11g/ora11g
adrci> set homepath diag/rdbms/ora11g/ora11g
adrci> show alert -tail 15
2009-02-27 14:25:05.036000 +08:00
Starting background process SMCO
SMCO started with pid=21, OS id=3855
Starting background process FBDA
FBDA started with pid=22, OS id=3857
replication_dependency_tracking turned off (no async multimaster replication found)
2009-02-27 14:25:07.246000 +08:00
Starting background process QMNC
QMNC started with pid=23, OS id=3859
2009-02-27 14:25:17.325000 +08:00
db_recovery_file_dest_size of 4096 MB is 0.00% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
2009-02-27 14:25:33.727000 +08:00
Completed: ALTER DATABASE OPEN
2009-02-27 14:29:59.158000 +08:00
Starting background process CJQ0
CJQ0 started with pid=25, OS id=3892
adrci>
5.小結
使用ADRCI命令可以很好的對各個目錄中的日誌檔案進行集中檢視,可以有效的提高工作效率,贊一個,在高度緊張的問題處理環境中這個工具可以有效的提高問題診斷的效率。
Good luck.
secooler
12.04.01
-- The End --
1.進入到adrci命令列模式
ora11g@RHEL53 /home/oracle$ which adrci
/oracle/u01/app/oracle/product/1101/db/bin/adrci
ora11g@RHEL53 /home/oracle$ 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)
------------------------------------------------------
ora11g@RHEL53 /home/oracle$ adrci
ADRCI: Release 11.1.0.6.0 - Beta on Fri Feb 27 15:23:52 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
ADR base = "/oracle/u01/app/oracle"
adrci>
2.使用 help show alert 命令檢視幫助文件
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> help show alert
Usage: SHOW ALERT [-p <predicate_string>] [-term]
[ [-tail [num] [-f]] | [-file <alert_file_name>] ]
Purpose: Show alert messages.
Options:
[-p <predicate_string>]: The predicate string must be double quoted.
The fields in the predicate are the fields:
ORIGINATING_TIMESTAMP timestamp
NORMALIZED_TIMESTAMP timestamp
ORGANIZATION_ID text(65)
COMPONENT_ID text(65)
HOST_ID text(65)
HOST_ADDRESS text(17)
MESSAGE_TYPE number
MESSAGE_LEVEL number
MESSAGE_ID text(65)
MESSAGE_GROUP text(65)
CLIENT_ID text(65)
MODULE_ID text(65)
PROCESS_ID text(33)
THREAD_ID text(65)
USER_ID text(65)
INSTANCE_ID text(65)
DETAILED_LOCATION text(161)
UPSTREAM_COMP_ID text(101)
DOWNSTREAM_COMP_ID text(101)
EXECUTION_CONTEXT_ID text(101)
EXECUTION_CONTEXT_SEQUENCE number
ERROR_INSTANCE_ID number
ERROR_INSTANCE_SEQUENCE number
MESSAGE_TEXT text(2049)
MESSAGE_ARGUMENTS text(129)
SUPPLEMENTAL_ATTRIBUTES text(129)
SUPPLEMENTAL_DETAILS text(129)
PROBLEM_KEY text(65)
[-tail [num] [-f]]: Output last part of the alert messages and
output latest messages as the alert log grows. If num is not specified,
the last 10 messages are displayed. If "-f" is specified, new data
will append at the end as new alert messages are generated.
[-term]: Direct results to terminal. If this option is not specified,
the results will be open in an editor.
By default, it will open in emacs, but "set editor" can be used
to set other editors.
[-file <alert_file_name>]: Allow users to specify an alert file which
may not be in ADR. <alert_file_name> must be specified with full path.
Note that this option cannot be used with the -tail option
Examples:
show alert
show alert -p "message_text like '%incident%'"
show alert -tail 20
adrci>
3.使用 show alert 列出各個目錄下的日誌目錄,輸入編號4,系統會自動呼叫vi編輯器檢視資料庫的alert日誌
adrci> show alert
Choose the alert log from the following homes to view:
1: diag/tnslsnr/RHEL53/listener
2: diag/clients/user_unknown/host_411310321_11
3: diag/clients/user_oracle/host_2175824367_11
4: diag/rdbms/ora11g/ora11g
Q: to quit
Please select option:4
4.另外一種檢視方式是,指定具體的 homepath 然後使用“show alert -tail 15”檢視對應日誌檔案的後15行
adrci> show homepath
ADR Homes:
diag/tnslsnr/RHEL53/listener
diag/clients/user_unknown/host_411310321_11
diag/clients/user_oracle/host_2175824367_11
diag/rdbms/ora11g/ora11g
adrci> set homepath diag/rdbms/ora11g/ora11g
adrci> show alert -tail 15
2009-02-27 14:25:05.036000 +08:00
Starting background process SMCO
SMCO started with pid=21, OS id=3855
Starting background process FBDA
FBDA started with pid=22, OS id=3857
replication_dependency_tracking turned off (no async multimaster replication found)
2009-02-27 14:25:07.246000 +08:00
Starting background process QMNC
QMNC started with pid=23, OS id=3859
2009-02-27 14:25:17.325000 +08:00
db_recovery_file_dest_size of 4096 MB is 0.00% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
2009-02-27 14:25:33.727000 +08:00
Completed: ALTER DATABASE OPEN
2009-02-27 14:29:59.158000 +08:00
Starting background process CJQ0
CJQ0 started with pid=25, OS id=3892
adrci>
5.小結
使用ADRCI命令可以很好的對各個目錄中的日誌檔案進行集中檢視,可以有效的提高工作效率,贊一個,在高度緊張的問題處理環境中這個工具可以有效的提高問題診斷的效率。
Good luck.
secooler
12.04.01
-- The End --
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31520497/viewspace-2156870/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Automatic Diagnostic Repository (ADR) in Oracle Database 11g Release 1 (ADRCI)OracleDatabase
- Windows下用命令列工具ADRCI跟蹤日誌檔案Windows命令列
- [20210723]adrci show 'No ADR base is set' 解決辦法.txt
- oracle 11g檢視alert日誌方法Oracle
- toad使用(檢視alert日誌、Database Report)Database
- oracle alert日誌Oracle
- 自定義 Command 檢視 Laravel 日誌Laravel
- 歸檔oracle alert日誌Oracle
- 檢視Oracle的redo日誌切換頻率Oracle
- adrci -age後面的引數單位是分鐘
- Linux 檢視日誌Linux
- alertmanager: 檢視日誌
- 檢視oracle的redo日誌組切換頻率Oracle
- 如何使用Journalctl檢視並操作Systemd日誌
- Hyperf日誌檢視元件元件
- Logminer如何檢視日誌
- docker檢視容器日誌命令Docker
- 檢視系統的日誌
- windows_weblogic日誌檢視WindowsWeb
- Oracle ADR介紹Oracle
- 檢視日誌的幾種形式
- mysql檢視binlog日誌詳解MySql
- oracle清理trace、alert、aud、listener等日誌檔案Oracle
- eclipse設定檢視GC日誌和如何理解GC日誌EclipseGC
- GBase8s 檢視邏輯日誌使用情況
- oracle的adr清理incidentOracleIDE
- NAS中如何檢視日誌記錄?
- [擴充套件包]-Laravel檢視日誌套件Laravel
- Linux 檢視日誌的命令彙總Linux
- [20230306]oracle 19c alert日誌日期格式設計不好的一個地方.txtOracle
- win10關機日誌檢視方法_win10電腦關機日誌怎麼檢視Win10
- 詳解Oracle AWR執行日誌分析工具Oracle
- centos7新增普通使用者用於檢視日誌檔案及檢視centos使用者CentOS
- 【TUNE_ORACLE】Oracle檢查點(四)檢查點對redo日誌的影響和redo日誌大小設定建議Oracle
- [20220826]顯示alert日誌檔案全路徑.txt
- 失敗登入行為輸出至alert日誌
- git檢視日誌的常用命令Git
- 在Linux中,如何檢視系統日誌?Linux