RE: oracle_home

  • From: "Patterson, Joel" <jpatterson@xxxxxxxxxx>
  • To: "niall.litchfield@xxxxxxxxx" <niall.litchfield@xxxxxxxxx>, "fuzzy.graybeard@xxxxxxxxx" <fuzzy.graybeard@xxxxxxxxx>
  • Date: Fri, 5 Apr 2013 14:44:41 -0400

I have come to use my own version of oraenv;  oraenvset as a replacement.  
oraenv has a spot for customizations, but then you have to be careful with 
root.sh.    All my scripts call it, and I never have to worry about whether the 
sysadmin replaces oraenv.   As far as I'm concerned he can hit Y every time.   
Seems to make life a lot easier, and the latest is always available but not 
used.


So... I'll continue with supporting arguments since I like it so much :)
-- not to mention the script is much more flexible as it will work using just 
the ORACLE_HOME, or indeed anything in oratab by adding lines using the same 
conventions for databases... ie OMS, AGENT, LISTENER_<X> and so forth.      For 
instance a dbstopall or dbstartall scripts can be run by the sysadmin for 
patching that simply cycles through oratab and shuts down or starts up 
everything, (depending on Y/N in oratab or if the line is commented).   It sets 
the environment for each line by calling oraenvset.

In this example, the configuration manager is considered for every home by 
default (I don't list CCR in oratab).   But there is a parameter that can 
optionally skip it, (NOCCR).    oraenvset has extra customizations for older 
databases as well -- such as exp/imp for oracle 9 still uses language 
variables.   (Inside the script there are case statements etc that determine 
much of what is needed).





Joel Patterson
Database Administrator
904 928-2790



--
Joel Patterson
Sr. Database Administrator | Enterprise Integration
Phone: 904-928-2790 | Fax: 904-733-4916
http://www.entint.com/

http://www.entint.com/

http://www.facebook.com/pages/Enterprise-Integration/212351215444231 
http://twitter.com/#!/entint http://www.linkedin.com/company/18276?trk=tyah 
http://www.youtube.com/user/ValueofIT

This message (and any associated files) is intended only for the use
of the addressee and may contain information that is confidential,
subject to copyright or constitutes a trade secret. If you are not the
intended recipient, you are hereby notified that any dissemination,
copying or distribution of this message, or files associated with this
message, is strictly prohibited. If you have received this message in
error, please notify us immediately by replying to the message and
deleting it from your computer. Messages sent to and from us may be
monitored. Any views or opinions presented are solely those of the
author and do not necessarily represent those of the company. [v.1.1]

From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On 
Behalf Of Niall Litchfield
Sent: Friday, April 05, 2013 1:50 PM
To: fuzzy.graybeard@xxxxxxxxx
Cc: ORACLE-L
Subject: Re: oracle_home

FYI That link points to AUDIT on my phone... I agree entirely.
<RANT> I really, really, wish though that by default oraenv got installed in 
/usr/bin OR that the script was configured by root.sh so that calling scripts 
from cron with ORAENV_ASK=NO just worked. I've lost track of the number of 
cronjobs I've seen that don't work when called from cron, but do interactively. 
root.sh does allow you to 'misspecify' the local binary directory of course.

And whilst I've got you all in the back of my cab, wouldn't it be great if 
Oracle came up with a common oraenv across products and version controlled it 
so you didn't need to decide whether to answer Y/N to replacing the oraenv and 
associated scripts </RANT> On Apr 5, 2013 6:21 PM, "Hans Forbrich" 
<fuzzy.graybeard@xxxxxxxxx> wrote:

> On 05/04/2013 10:14 AM, Norman Dunbar wrote:
> > Oraenv is supplied to make your life easy, I'm puzzled as to whay
> > you are not using it. Cheers, Norm.
> It is surprising how few DBAs are aware of oraenv, and even fewer seem
> to have read the relevant docs at
>
> http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_4007.
> htm#i2059073 (Section 1.2.3 describing how and why oraenv is used)
>
> The idea of PATH=$PATH:$ORACLE_HOME/bin is, unfortunately, taught in
> Oracle University classes and has become a widespread practice. Even
> OU course developers were, for the longest time, not aware that oraenv
> cleans up the PATH.
>
> /Hans
> --
> //www.freelists.org/webpage/oracle-l
>
>
>


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



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


Other related posts: