The alert log file (also referred to as the ALERT.LOG) is a chronological log of messages and errors written out by an Oracle Database. Typical messages found in this file is: database startup, shutdown, log switches, space errors, etc. This file should constantly be monitored to detect unexpected messages and corruptions.Oracle will automatically create a new alert log file whenever the old one is deleted.
Oracle 11g has introduced many new features for database monitoring and administration. This month, we will examine the new interface for monitoring database events within the Oracle 11g database release. In previous releases of Oracle database, there was the alert.log text based file that contains all database activity of use to the vigilant DBA. The alert.log file contains error messages and major database activities and operations which are monitored by the DBA as part of daily maintenance. However, this alert.log file disappears with Oracle 11g and is now replaced by an XML file called the log.xml file.
Oracle 11g also introduces a new command line utility called the ADR Command Interface or ADRCI to review the contents of the log.xml file. By default, the ADR tool is located under the Oracle 11g directory ORACLE_BASE/diag/rdbms/SID/SID/alert
In order to use the ADR tool, the command adrci is issued with Oracle 11g.
Oracle 11g also introduces a new command line utility called the ADR Command Interface or ADRCI to review the contents of the log.xml file. By default, the ADR tool is located under the Oracle 11g directory ORACLE_BASE/diag/rdbms/SID/SID/alert
In order to use the ADR tool, the command adrci is issued with Oracle 11g.
Location of the ALERT.LOG file
Oracle will write the alert.log file to the directory as specified by the BACKGROUND_DUMP_DEST parameter. If this parameter is not set, the alert.log will be created in the ORACLE_HOME/rdbms/trace directory.
SQL> show parameter BACKGROUND_DUMP_DEST NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ background_dump_dest string /u01/app/oracle/diag/rdbms/o11gr1/ o11gr1/trace
Am sure it will work in 11g, that parameter has been around for a long time.
Seems like the correct way to find it to me.
If the background_dump_dest parameter isn't set, the alert.log will be put in $ORACLE_HOME/RDBMS/trace
The default location where the log.xml file is located on the test Oracle 11g Red Hat Linux server in this example:
/u01/app/oracle/diag/rdbms/ora11g/ORA11G/alert
Writing to the ALERT.LOG file
Am sure it will work in 11g, that parameter has been around for a long time.
Seems like the correct way to find it to me.
If the background_dump_dest parameter isn't set, the alert.log will be put in $ORACLE_HOME/RDBMS/trace
The default location where the log.xml file is located on the test Oracle 11g Red Hat Linux server in this example:
/u01/app/oracle/diag/rdbms/ora11g/ORA11G/alert
Users can write messages to the alert.log file. Example:
-- Write message to alert.log exec dbms_system.ksdwrt(2, 'Look Ma, I can write to the alert.log file!'); PL/SQL procedure successfully completed. -- Flush the buffer exec dbms_system.ksdfls; PL/SQL procedure successfully completed.
No comments:
Post a Comment