Quckest was to find oracle alert log on linux box

Recently I had to work in a lot of new to me oracle environments. And I found a some places do not have standard for ORACLE_BASE, and no correlation between SID and Unique_name.
With that – finding oracle alert log
$ORACLE_BASE/diag/rdbms/{DB_UNIQUE_NAME}/{ORACLE_SID}/trace/alert_{ORACLE_SID}.log
takes more than 30 seconds to find. Its frustrating. At least for lazy people like me.

So here is quicker way to locate alert log:


[amoseyev@linuxtest] /usr/sbin/lsof | grep trc
oracle   14180   oracle    9w    REG    0,20   1064    50693 /u01/oracle/diag/rdbms/orcl2/orcl2/trace/orcl2_ora_14180.trc (deleted) (10.100.100.50:/vol/nfs1)
oracle   21201   oracle   17w    REG    0,20   1877    31141 /u01/oracle/diag/rdbms/orcl2/orcl2/trace/orcl2_diag_21201.trc (deleted) (10.100.100.50:/vol/nfs1)

Its not hard to extrapolate where alert log will be.
With that I am down to 3 seconds in journey of finding alert logs.
Happy seconds/time/life savings 🙂

Advertisements
This entry was posted in Linux, Oracle, Uncategorized and tagged , , , , , , , , , . Bookmark the permalink.

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 )

Google+ photo

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

Connecting to %s