First, through the OEM to view.
Second, use a text editor to view.
1. Log in to the database using the query tool, such as Sql*plus.
2. Query V$diag_info view to locate alert log location.
Sql> Select Name,value from V$diag_info
2 where name in (' Diag Trace ', ' Diag Alert ');
NAME
----------------------------------------------------------------
VALUE
----------------------------------------------------------------
Diag Trace
/opt/oracle11g/diag/rdbms/oracl/oracl/trace
Diag Alert
/opt/oracle11g/diag/rdbms/oracl/oracl/alert
3. If you are viewing alert log in text format, enter the Diag Trace directory first. Open Alert_sid.log with a text editor.
4. If you are viewing alert log in XML format, enter the DIAG alert directory. Open Log.xml with a text editor.
Use the Adrci command line to view alert log in XML format but the XML tag is not displayed.
1, enter the Adrci interactive mode.
[Email protected] ~]$ Adrci
Adrci:release 11.2.0.1.0-production on Tue Mar 6 12:04:38 2012
Copyright (c) 1982, the Oracle and/or its affiliates. All rights reserved.
ADR base = "/opt/oracle11g"
Adrci>
2. Check the current ADR home and identify the ADR home that contains the instance you want to view alert log
Adrci> Show Homes
ADR Homes:
Diag/tnslsnr/zeng/listener
Diag/rdbms/oracl/oracl
If the desired ADR home is not set yet. Set up in the following manner
Adrci> Set HomePath Diag/rdbms/oracl/oracl
Adrci> Show Homes
ADR Homes:
Diag/rdbms/oracl/oracl
3. Check alert log.
Show alert starts from the beginning of alert log. Use: Quit quit.
Show Alert-tail View the last 10 lines of alert log.
Show Alert-tail n View the last n rows of alert log.
The appearance of the entry. Use CTRL + C to exit
View Alert.log