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.