New Oracle Home


 
Thread Tools Search this Thread
Operating Systems Solaris New Oracle Home
# 8  
Old 04-23-2014
Previous suggestion only works if the user's login shell is bash (or ksh).
The following also works if the user's login shell is /bin/sh or /sbin/sh:
Code:
cd
echo "export ORACLE_HOME; ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1" >> .profile
. .profile
echo $ORACLE_HOME

# 9  
Old 04-24-2014
. .profile
.profile not found

---------- Post updated 04-24-14 at 09:08 AM ---------- Previous update was 04-23-14 at 02:34 PM ----------

This is what I did. I logged in as Oracle and changed the .profile which was under some directory.
This is what I have now.
When do I echo $ORACLE_BASE or $ORACLE_HOME, it's working fine but when I log in as root it gives me another location for ORACLE_BASE and ORACLE_HOME. I wonder why is that? Any help?Smilie
# 10  
Old 04-24-2014
Either you change your profile file and run it or run the below every time you login
Code:
export ORACLE_HOME="/u01/app/oracle/product/11.2.0/dbhome_1"

# 11  
Old 04-24-2014
Which profile should I change?
I already changed 1 profile when I logged in as Oracle.
Do all the users have different profile which needs to be updated with the Oracle Base and Oracle Home?

(I don't why oracle is not as easy as Microsoft. Installation takes half an hour which includes server installation+DB creation+users creation+assigning port+make an inbound rule in firewall etc+if someone wants to implement encryption on the DB)
# 12  
Old 04-24-2014
Even here its easy if you have access to change /etc/profile file so that any user logging in will have the changes unless he explicitly modifies
# 13  
Old 04-24-2014
Quote:
Originally Posted by newborndba
I don't see much in my /etc/profile
What do you mean you don't see much ?

As already suggested, you just need to set the variable here and every user using sh, ksh or bash will inherit the setting:
Code:
export ORACLE_HOME
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1

If there are csh users, you'll also need to add this line in /etc/.login:
Code:
setenv ORACLE_HOME /u01/app/oracle/product/11.2.0/dbhome_1

# 14  
Old 04-25-2014
This is what I have in my /etc/profile: I have no idea what I am doing or what I need to do: I do appreciate the fact that you guys are trying to help me out so much.
This is my Oracle home: /space/u01/app/oracle/product/11.2.0/dbhome_1

I am logged in as root:
cat /etc/profile (This is what I have)

Code:
#ident  "@(#)profile    1.19    01/03/13 SMI"   /* SVr4.0 1.3   */

# The profile that all logins get before using their own .profile.

trap ""  2 3
export LOGNAME PATH

if [ "$TERM" = "" ]
then
        if /bin/i386
        then
                TERM=sun-color
        else
                TERM=sun
        fi
        export TERM
fi

#       Login and -su shells get /etc/profile services.
#       -rsh is given its environment in its .profile.

case "$0" in
-sh | -ksh | -jsh | -bash)

        if [ ! -f .hushlogin ]
        then
                /usr/sbin/quota
                #       Allow the user to break the Message-Of-The-Day only.
                trap "trap '' 2"  2
                /bin/cat -s /etc/motd
                trap "" 2

                /bin/mail -E
                case $? in
                0)
                        echo "You have new mail."
                        ;;
                2)
                        echo "You have mail."
                        ;;
                esac
        fi
esac

umask 022
trap  2 3
PATH=/usr/java/bin:/usr/java/jre/bin:$PATH
Export ORACLE_HOME="/space/u01/app/oracle/product/11.2.0/dbhome_1"


Last edited by Franklin52; 04-25-2014 at 10:42 AM.. Reason: Please use code tags
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extract Oracle home from Oratab and compare values

Friends, I'm trying to do below in ksh script, while requesting user to provide src_db and dest_db values 1. Extract src_db and dest_db Oracle home from oratab file 2. Don't find db if it starts with comment (#) 3. Compare both values 4. Message success or exit with error if they don't... (0 Replies)
Discussion started by: homer4all
0 Replies

2. Solaris

Oracle Solaris 11 on home server

I am interested in learning oracle solais 11 but I can't seem to find a discounted version/free version with security updates for home use (I would like to set it up as I would a real server for practice so I would like to get security updates I understand that there is a trial version but you... (3 Replies)
Discussion started by: crookedmaze
3 Replies

3. Shell Programming and Scripting

how to change ORACLE HOME?

All, I have to change my ORACLE_HOME in the prodution environment. I have chaged it in .profile file but when I am typing the command bash-2.05$ echo $ORACLE_HOME /apps/oracle/product/10.2.0.4.2011Q1 Instead of Q1 it should show Q3 bcoz I have changed it in .profile file. But at the same... (2 Replies)
Discussion started by: Oracle_User
2 Replies

4. Shell Programming and Scripting

cp -p /home/* home/exp/*.date not working please help

:( ---------- Post updated at 01:51 AM ---------- Previous update was at 01:50 AM ---------- Not working ---------- Post updated at 02:04 AM ---------- Previous update was at 01:51 AM ---------- cp -p /home/* home/exp/*.`date` i am using this (4 Replies)
Discussion started by: rishiraaz
4 Replies

5. Solaris

Home Directory for oracle user

Hello all, I am Installing Oracle 11g on my Solaris OS. I created the below oracle user: # /usr/sbin/useradd -g oinstall -G dba oracle but when i am trying to to su - oracle it give me the below error No directory Do i have to setup a home directory for oracle user? and how can i do... (1 Reply)
Discussion started by: beayni33
1 Replies

6. UNIX and Linux Applications

Setting up Oracle RAC at home

Hello, I'm planning to set up Oracle 10g RAC at home. I was initaillay planning to get a windows desktop and install Cent OS after wiping out the existing windows OS. I have some questions with regards to this. 1) For setting up RAC, I would have to install an additional NIC besides the one... (2 Replies)
Discussion started by: luft
2 Replies

7. Shell Programming and Scripting

$HOME Not Getting Set for Oracle Scheduler Script at Runtime

We are researching the possibility of using Oracle 10g Scheduler on Solaris 10 to launch scripts at our site, and the script that I am testing does not get $HOME (and other environment variables) set correctly. Here is the Korn shell script (show_info.ksh): #!/usr/bin/ksh id env | sort Here... (4 Replies)
Discussion started by: shew01
4 Replies

8. Shell Programming and Scripting

setting Oracle Home

Hi, if i set Oracle home in the command line as export ORACLE_HOME=/usr/oracle/product/9.2.0; and then checking it by typing echo $ORACLE_HOME,its getting the correct result.But if i try setting the ORACLE_HOME from a shell script by just including the same line as above,it was... (3 Replies)
Discussion started by: DILEEP410
3 Replies

9. UNIX for Dummies Questions & Answers

Hardware dummy trying to set up Unix workstation for Oracle at home for practice!

I have been planning to set up a Unix workstation at home to host an Oracle database just for database admin. practice. But I don't know enough about hardware to know whether this can be done on a regular desktop and the required hardware config. If anyone could kindly guide me in this mission I... (4 Replies)
Discussion started by: tmanpakdee
4 Replies
Login or Register to Ask a Question