RE: 11g RAC oraenv question

  • From: "Andre van Winssen" <dreveewee@xxxxxxxxx>
  • To: <cjnewman@xxxxxxxxxxxxx>, <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 31 Mar 2010 06:48:52 +0200

Same as I have experienced. I always add local instance name to oratab file
so I can keep using oraenv, i.e. :

 

T:/u01/app/oracle/product/11.2.0/dbhome_1:N   # added by agent

T1:/u01/app/oracle/product/11.2.0/dbhome_1:N  # added by me

 

Andre

 

 

Van: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx]
Namens Newman, Christopher
Verzonden: dinsdag 30 maart 2010 14:51
Aan: oracle-l@xxxxxxxxxxxxx
Onderwerp: 11g RAC oraenv question

 

Greetings,

 

We have a database named 'T', with instances T1 and T2.  The default entry
in the oratab looks something like this:

 

T:/u01/app/oracle/product/11.2.0/dbhome_1:N             # line added by
Agent

 

. oraenv T, sets the *home* correctly, but does not set the instance.  We
have to manually export ORACLE_SID=T1.

 

Does anyone have a good way to overcome this?  We have some aliases set up
and I'm having a heck of a time getting them to work with this current
setup.

 

For example, we have an alias that does a less on the alert log, and it's
based off the ORACLE_SID:

 

alert='less $ORACLE_BASE/admin/$ORACLE_SID/bdump/alert*log'

 

In our RAC instances, I think it will look something like this, but I'm
missing a piece, with INSTANCE_NAME being a variable I'm not sure how to
grab (multiple databases/instances on the box).

 

alert='less $ORACLE_BASE/diag/rdbms/$ORACLE_SID/$INSTANCE_NAME
/trace/alert*log'

 

Thanks- Chris

 

 

Other related posts: