Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
cancel
Showing results for 
Search instead for 
Did you mean: 

Workable Oracle user profile

SOLVED
Go to solution
Steven Gabriel_1
Occasional Contributor

Workable Oracle user profile

Hi all;
I have joined a community of users who do all their work as "oracle". In fact I have 26 oracle sessions at one time. My goal is to "teach the old dog new tricks" but I need some ammunition from all of you. Each user will obviously log in as themselves, I would like to build a users profile that will encompass both HPUX default, and oracle environments. Where, in this case, the DBAs and the developers can work independently but share the same environment.
Any help would be greatly appreciated and helpful in my case. The oracle DB is version 817 hosted by 11.0
Thanks
1 REPLY
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Workable Oracle user profile

Hi:

My favorite way to do this is to create a 'source' file (e.g. /usr/local/bin/Oraenv.sh)
that looks something like this:

#sets ORACLE vars and PATH

ORACLE_BASE=/PrdOra/app/oracle
ORACLE_HOME=${ORACLE_BASE}/product/8.1.1
TNS_ADMIN=${ORACLE_HOME}/network/admin
ORACLE_SID=baanprd
PATH=${PATH}:${ORACLE_HOME}/bin

export ORACLE_BASE ORACLE_HOME TNS_ADMIN ORACLE_SID PATH

------------------------------------------

Now the .profile of each user should add
something like this to the standand HP .profile

P0PROG=/usr/local/bin/Oraenv.sh
if [ -r ${P0PROG} -a -f ${P0PROG} ]
then
. ${P0PROG}
fi
unset P0PROG

It is very important in the sourced file that no exit statement be included. The beauty of this
method is that this same oranenv.sh can be sourced in other scripts that run under cron for example and the stupid stuff that happens when someone
tries to su - oracle -c command because some of the commands expect an interactive environment is avoided.



If it ain't broke, I can fix that.