Re: oraenv - I am sure it used to be so simple

From: John Hurley <hurleyjohnb_at_yahoo.com>
Date: Thu, 27 Feb 2014 11:47:58 -0500
Message-Id: <B99CCEAA-1848-4E98-B9B2-9A56F33EAF94_at_yahoo.com>



I have tended to avoid oraenv and use a separate script to set all necessary stuff ... Dotted in via profile but also done in any shell scripts ... Thought is do not hope env is set up correctly instead take complete control

Sent from my iPhone

> On Feb 27, 2014, at 11:40 AM, "Patterson, Joel" <jpatterson_at_entint.com> wrote:
>
> There is a custom area for code inside oraenv. What I would have put there, I instead put into a separate script oraenvset located in same directory. Thus root.sh never has to worry about overwriting it, and I don’t worry about that either. All other scripts call this to set env.
>
> For the other user(s), if needed, I put a call to oraenvset in their .profile, which sets to a default environment. They can also execute (source), it by hand and set to others if necessary, like another database. It is also in the path so: . oraenvset <oracle_sid> (or anything listed in oratab.
>
> From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Peter Hitchman
> Sent: Thursday, February 27, 2014 10:51 AM
> To: oracle-l
> Subject: oraenv - I am sure it used to be so simple
>
> Hi,
> An Oracle client install:
> Release 11.2.0.4.0
>
> Then when a non dba user calls oraenv:
>
> "ORACLE_SID = [CLIENT_1] ?
> ORACLE_BASE environment variable is not being set since this
> information is not available for the current user ID tspstest1.
> You can set ORACLE_BASE manually if it is required."
>
> Now I have come across this before, but I decided to check on MOS and came across
> note 1387463.1, which really confuses me.
>
> First it says:
> "The 'oraenv' script is used to allow the DBA to set a common environment for all users and make it easier for users to move between databases."
>
> but then a bit later on in reference to the above message:
>
> "This is expected behaviour as oraenv script is intended to be used by dba users only"
>
> So which is it,is oraenv for the use of all users or just DBAs?
>
> I have always been confused by the test in the oraenv script to see if oraclehomeproperties.xml is writeable, although that could be related to a bug I logged in the 11.1 release with Oracle, about the fact that the orabase command always re-wrote this file even when it did not need to.
>
> So what do other people do, when it comes to setting up an Oracle environment for non dba users? Manually set ORACLE_BASE, ignore the error or not use oraenv at all?
>
> Regards
>
> Pete
>
> --
> Joel Patterson
> Sr. Database Administrator | Enterprise Integration
> Phone: 904-928-2790 | Fax: 904-733-4916
> www.entint.com
>
>
>
>
>
> 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]

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Feb 27 2014 - 17:47:58 CET

Original text of this message