Re: missing alert.log mystery (it's not what you think)

  • From: Charles Schultz <sacrophyte@xxxxxxxxx>
  • To: ORACLE-L <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 16 May 2011 14:06:19 -0500

Some here is something I found interesting - if I truss a sqlplus "alter
system" call in any other database, I get results like the following:

2801:   access("./alert_TEMQA.log", F_OK)               Err#2 ENOENT
2801:   access("/u01/app/oracle/local/bin/alert_TEMQA.log", F_OK) Err#2
2801:   open("/u01/app/oracle/diag/rdbms/temqa/TEMQA/trace/alert_TEMQA.log",

I would be curious if you all get the same thing. I used "truss -aefo
some_output_filename sqlplus / as sysdba" and did something like "alter
system set timed_statistics=TRUE;".

I find it interesting that Oracle is always (always?) looking for
./alert_$SID.log first. Where exactly is ./ ? Next it looks in another
directory defined in our PATH. Note how both attempts to access the
alert.log result in Err#2 ENOENT. However, in my bizarre example with TEMDEV
the first access does not produce an error, which implies that Oracle found
the file at ./ Is there some kind of logic in the code which says "if -e
./alert.log then skip_everything_else"?

Charles Schultz

Other related posts: