Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: oraenv oratab and Oracle RAC
spy_234432_at_yahoo.com wrote:
> Hi Everyone, Our company started creating applications on Oracle RAC.
> The development DBAs did something that I thought was weird and I just
> want to run it by people in this NG.
>
> In the /etc/oratab, the databases are listed as such-
>
>
>
> mmlive:/oracle/product:Y
> mmhist:/oracle/product:Y
> mmtest:/oracle/product:Y
> mmtrain:/oracle/product:Y
>
>
>
>
> However, the oraenv has some code in it that appends the node to the
> database name, creating the instance name.
>
>
>
> # Install any "custom" code here
> #
> NODE=`$CRS_HOME/bin/olsnodes -l -n | awk '{print $2;}'`
> ORACLE_SID=$ORACLE_SID$NODE
>
>
> The database name is mmlive and the Instance name is mmlive1. Also,
> you cannot log into the instance with the database name.
>
>
>
> (mmtest):/ora_backup/prev_0/mmlive/dbf> . oraenv
> ORACLE_SID = [mmtest] ? mmlive
> ORACLE_HOME = [/home/oracle] ?
> (mmlive1):/ora_backup/prev_0/mmlive/dbf> sqlplus '/ as sysdba'
> SQL*Plus: Release 9.2.0.5.0 - Production on Fri Sep 22 11:17:17 2006
> Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
> Connected to an idle instance.
> SQL>
>
>
> This creates a problem for us (the support DBAs) because many of our
> scripts and programs directly reference the oratab without using
> oraenv.
>
> Is this a typical configuration?
Normally, whatever that is with RAC, you should be able to log into the following:
I would expect to see something like this:
TSTAB.TAF =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = vipalpha1.psoug.org)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = vipalpha2.psoug.org)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = vipalpha3.psoug.org)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = vipalpha4.psoug.org)(PORT = 1521)) (LOAD_BALANCE = yes) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = TSTA.TAF) (FAILOVER_MODE = (TYPE = SELECT) (METHOD = BASIC) (RETRIES = 180) (DELAY = 5) ) )
TSTAB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = vipalpha1.psoug.org)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = vipalpha2.psoug.org)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = vipalpha3.psoug.org)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = vipalpha4.psoug.org)(PORT = 1521)) (LOAD_BALANCE = yes) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = TSTA) )
TSTA4 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = vipalpha4.psoug.org)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = TSTA) (INSTANCE_NAME = TSTA4) )
TSTA3 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = vipalpha3.psoug.org)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = TSTA) (INSTANCE_NAME = TSTA3) )
TSTA2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = vipalpha2.psoug.org)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = TSTA) (INSTANCE_NAME = TSTA2) )
TSTA1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = vipalpha1.psoug.org)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = TSTA) (INSTANCE_NAME = TSTA1) )
Why is anyone messing with /etc/oratab?
-- Daniel Morgan University of Washington Puget Sound Oracle Users GroupReceived on Fri Sep 22 2006 - 12:34:23 CDT