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

  • From: "Patterson, Joel" <jpatterson@xxxxxxxxxx>
  • To: "pjhoraclel@xxxxxxxxx" <pjhoraclel@xxxxxxxxx>, oracle-l <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 27 Feb 2014 11:40:08 -0500

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@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] 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<http://www.entint.com/>

[http://i1202.photobucket.com/albums/bb367/Entint/signaturev61.jpg]<http://www.entint.com/>

[http://i1202.photobucket.com/albums/bb367/Entint/th_FaceBook1.jpg]<http://www.facebook.com/pages/Enterprise-Integration/212351215444231>
  [http://i1202.photobucket.com/albums/bb367/Entint/th_Twitter1.jpg] 
<http://twitter.com/#!/entint>   
[http://i1202.photobucket.com/albums/bb367/Entint/th_LinkedIn1.jpg] 
<http://www.linkedin.com/company/18276?trk=tyah>   
[http://i1202.photobucket.com/albums/bb367/Entint/th_YouTube1.jpg] 
<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]

Other related posts: