Oracle 11G中的ADR介绍:
ADRCI 之oracle 日志查看
在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)