About Oracle 11g, one of the first things that caught me by surprise with 11g, when I first started in the beta program, was that the default location for the alert log has moved. It is still placed under the traditional OFA structure, but not /u01/app/oracle/admin. There is a new directory called diag that resides in /u01/app/oracle as seen on one of my systems:
rac13 | PWICRM3 | /export/home/oracle > cd /u01/app/oracle/diag/rdbms/pwicrm/PWICRM3/trace/
rac13 | PWICRM3 | /u01/app/oracle/diag/rdbms/pwicrm/PWICRM3/trace > ll alert_PWICRM3.log
-rw-r----- 1 oracle dba 278929 Sep 15 08:39 alert_PWICRM3.log
In this case, my database is called PWICRM and the first instance is PWICRM3. To quickly locate alert logs associated with many different ORACLE_HOMEs simple execute the adrci command and then execute “show alert”
rac13 | PWICRM3 | /export/home/oracle > adrci
ADRCI: Release 11.1.0.7.0 - Production on Thu Sep 15 08:50:52 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
ADR base = "/u01/app/oracle"
adrci> show alert
Choose the alert log from the following homes to view:
1: diag/rdbms/pwiprv/PWICRM3
……………………………………
6: diag/asm/+asm/+ASM3
Q: to quit
Please select option:
Also, you can get more helpful information via "help show alert":
adrci> help show alert
Usage: SHOW ALERT [-p ] [-term]
[ [-tail [num] [-f]] | [-file ] ]
Purpose: Show alert messages.
Options:
[-p ]: 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 ]: Allow users to specify an alert file which
may not be in ADR. 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
We can also get info detail from following oracle link:
http://download.oracle.com/docs/cd/E11882_01/server.112/e10701/adrci.htm#SUTIL700
rac13 | PWICRM3 | /export/home/oracle > cd /u01/app/oracle/diag/rdbms/pwicrm/PWICRM3/trace/
rac13 | PWICRM3 | /u01/app/oracle/diag/rdbms/pwicrm/PWICRM3/trace > ll alert_PWICRM3.log
-rw-r----- 1 oracle dba 278929 Sep 15 08:39 alert_PWICRM3.log
In this case, my database is called PWICRM and the first instance is PWICRM3. To quickly locate alert logs associated with many different ORACLE_HOMEs simple execute the adrci command and then execute “show alert”
rac13 | PWICRM3 | /export/home/oracle > adrci
ADRCI: Release 11.1.0.7.0 - Production on Thu Sep 15 08:50:52 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
ADR base = "/u01/app/oracle"
adrci> show alert
Choose the alert log from the following homes to view:
1: diag/rdbms/pwiprv/PWICRM3
……………………………………
6: diag/asm/+asm/+ASM3
Q: to quit
Please select option:
Also, you can get more helpful information via "help show alert":
adrci> help show alert
Usage: SHOW ALERT [-p ] [-term]
[ [-tail [num] [-f]] | [-file ] ]
Purpose: Show alert messages.
Options:
[-p ]: 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 ]: Allow users to specify an alert file which
may not be in ADR. 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
We can also get info detail from following oracle link:
http://download.oracle.com/docs/cd/E11882_01/server.112/e10701/adrci.htm#SUTIL700
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/628922/viewspace-707619/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/628922/viewspace-707619/