My alert.log is broken

Well, not mine, but a recent post on the oracle-l mailing list which I thought was worth linking to and repeating. Firstly, because it’s interesting, and secondly, because it shows some good problem solving skills by both the poster and the wider Oracle community.

The poster in question was experiencing a problem whereby his alert log was not updating…

We have an alert.log that was last updated by the database on May 6th.
Strangely enough, the log.xml in the alert directory of the diag destination
is being updated normally, it is just the plain text alert.log in the trace
directory that is not updated. We have bounced the database, changed the
diag_destination parameter and I have even grepped all the file descriptors
in /proc/*/fd for traces of a possibly opened alert.log - nothing, the alert.log
is still not being updated. I tried dbms_system.ksdwrt to force a write to
the alert.log - again, the log.xml is updated, the plain text is not.


The solution, it turns out, was quite surprising. There was a copy of the alert.log in the $ORACLE_HOME/dbs directory. This is the default directory for all things Oracle (try creating a datafile without specifying a full path and it will end up in there). When Oracle spotted the alert.log in the $OH/dbs directory it immediately assumed that it was the correct one and ignore the initialisation parameters. Strange behaviour and not one that I’ve ever seen before.

Advertisement

2 Responses to My alert.log is broken

  1. Sandesh says:

    Ok, here is another puzzling one! I came across your post above, and checked the $ORACLE_HOME/dbs and did not find any alert log file there! Now what?!

    Like

    • The main point of this (old) post is that it is surprising to find an alert log in $ORACLE_HOME/dbs

      The actual location will vary in different releases, and there are 2 alert logs written; the xml files in the DIAG dest and the alert*.log in the “trace” directory.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.