RE: Map database to running instance from oratab?

From: <Joel.Patterson_at_crowley.com>
Date: Thu, 2 Aug 2012 07:23:30 -0400
Message-ID: <C95D75DD2E01DD4D81124D104D317ACA1C74F5792B_at_JAXMSG01.crowley.com>



I didn't get exactly what your script is for, but I 'll offer this suggestion which might work if you can incorporate it somewhere.

The idea is to append the colon, ':' when you are extracting the Database names, and then strip off the colon, etc.

parmline=`grep "^${dbname}:" ${ORATAB}
export ORACLE_SID=`echo ${parmline} | cut -f 1 -d":"`

I just extracted the pertinent lines for this example. I use my script to set the environment for about everything, listeners if need be, by oracle_home, agent, and oms.

I am presently in the process of reworking the script to be more flexible and won't be done until after my next upgrade.

Joel Patterson
Database Administrator
904 727-2546

-----Original Message-----
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Ethan Post Sent: Thursday, August 02, 2012 2:58 AM
To: Herring Dave - dherri
Cc: Radoulov, Dimitre; oracle-l
Subject: Re: Map database to running instance from oratab?

Thanks Dave. As for ksh, that is all I have ever written in besides python. On Sun, Jul 29, 2012 at 2:27 PM, Herring Dave - dherri < Dave.Herring_at_acxiom.com> wrote:

> Ethan,
>
>

--
http://www.freelists.org/webpage/oracle-l


--
http://www.freelists.org/webpage/oracle-l
Received on Thu Aug 02 2012 - 06:23:30 CDT

Original text of this message