You are hereOracle 11g Monitoring and Goodbye Alert Log!
Oracle 11g Monitoring and Goodbye Alert Log!
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.
Let's explore an example on how to use the new ADR command tool to view our new Oracle 11g diagnostic log contents.
The default location where the log.xml file is located on the test Oracle 11g Red Hat Linux server in this example:
Start a new session of ADR command tool by issue command adrci:
Now let's check out some of the cool new features of the ADR command tool. To display options with the help command from within ADRCI:
For extended help options we can use the help extended command from within the ADR command tool and shown below:
We can get detailed explanations of an option such as the BEGIN BACKUP command which will present a series of screens much like that found in the old UNIX man pages.
What you should finally realize at this point is that Oracle 11g has taken monitoring to a whole new level over 10g release. In fact, think of it as monitoring on steroids. We will next view an example of how to look at the log files for database monitoring with Oracle 11g on Red Hat Linux.
Lets scroll down and see more options for the show alert option with ADRCI:
As you can see, there are now options to review the old style alert.log files as well as the ability to view the log files from the Oracle listener and host. We can also parse the log file to see just a recent activity which is useful for quick monitoring tasks. Lets take a peek at one of the recent log files in the next example.
We choose option 1 and the alert log file is displayed below:
By default the log files are stored under the Linux /tmp directory structure.
To exit and return to the main ADR command screen we use the :q command within the Linux vi editor.
The ADR command tool also lets us view the new health monitor reports and functions.
For instance, if I wish to look at the most recent health monitor execution tasks then I can simply issue the show hm_run command within the ADR command interface.
Also of note with Oracle 11g are several new V$ tables that correspond to the ADR and new health monitoring features:
Complete syntax and further details on the ADR command tool is available online in the Oracle 11g Documentation located here
We have barely scratched the surface in how to use this potent new monitoring feature for Oracle 11g. Explore the power of the tool as it promised much needed functionality and useful instrumentation for busy Oracle DBAs in monitoring of large and complex Oracle 11g environments.