Thursday, July 24, 2008

Busy getting ready for Oracle Open World 2008!

Well, good news-

My Oracle Mix presentation idea has received enough votes to be among the top new sessions to be at Oracle Open World 2008 this year. I am excited and hard at work on the workshop presentation for Oracle 11g tips and database internals. More details on my session can be found here.

I look forward to meeting all the top Oracle gurus at Open World this year- it should promise great fun and wonderful chance to meet new friends and business contacts.

Also, based on the Oracle Open World 2008 conference, besides the amazing array of technical sessions, the entertainment proves to be top notch with Seal and UB40 to perform during the conference week.


I am also at work on my second new book, Oracle 11g Insider Secrets, which will be completed in 2009. My first Oracle book should also be available from Rampant Press next year as well on database migrations to Oracle. Once I have some time, I will continue to discuss more 11g new features and other tidbits on Oracle technology.

Stay tuned for more to come!
-Ben

Friday, July 4, 2008

Oracle 11g Monitoring and Goodbye Alert Log!

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.


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:

/u01/app/oracle/diag/rdbms/ora11g/ORA11G/alert


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:

V$HM_CHECK
V$HM_CHECK_PARAM
V$HM_FINDING
V$HM_INFO
V$HM_RECOMMENDATION
V$HM_RUN


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.

Regards,
Ben