New Oracle Home


 
Thread Tools Search this Thread
Operating Systems Solaris New Oracle Home
# 15  
Old 04-25-2014
The Export in the last line should be changed to export. UNIX is case sensitive.
And also check if the path is correct.
you have provided us /u01/app/oracle/product/11.2.0/dbhome_1 where as the /etc/profile file has /space/u01/app/oracle/product/11.2.0/dbhome_1
# 16  
Old 04-25-2014
As said before:
replace
Code:
export ORACLE_HOME="/space/u01/app/oracle/product/11.2.0/dbhome_1"

by
Code:
export ORACLE_HOME
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1

because only the latter work with Bourne shell (/bin/sh, /sbin/sh).
# 17  
Old 04-25-2014
This is what it looks like now:
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 PATH
export ORACLE_HOME
ORACLE_HOME=/space/u01/app/oracle/product/11.2.0/dbhome_1

---------- Post updated at 09:27 AM ---------- Previous update was at 09:20 AM ----------

I was able to change the profile.
This is what the problem is:
When I logged in as oracle, I see this:
Code:
echo $ORACLE_HOME
/space/u01/app/oracle/product/11.2.0/dbhome_1

When I log in as root, I see this:
Code:
echo $ORACLE_HOME
/space/home/oracle/database/product/10.2.0/Db_1

When I do env, it gives me something totally different:
Code:
BMC_SLM_JAVA_HOME=/usr/java
CATALINA_HOME=/space/home/apache-tomcat-5.5.23/apache-tomcat-5.5.23
DISPLAY=localhost:10.0
EDITOR=vi
HOME=/
JAVA_HOME=/usr/java
LD_LIBRARY_PATH=/space/home/oracle/database/product/10.2.0/Db_1:/usr/ar/idmux01/eaton/api/lib:/usr/java/bin:/usr/java/lib:/usr/java/jre:/space/home/apache-tomcat-5.5.23/apache-tomcat-5.5.23/webapps/arsys/WEB-INF/lib:/usr/openwin/lib
LOGNAME=root
MAIL=/var/mail//root
MANPATH=:/usr/man:/usr/share/man:/opt/SUNWvts/man
OPENWINHOME=/usr/openwin
ORACLE_BASE=/space/home/oracle
ORACLE_HOME=/space/home/oracle/database/product/10.2.0/Db_1
ORACLE_SID=eaton
PATH=/space/home/oracle/database/product/10.2.0/Db_1/bin:/usr/java/bin:/usr/java/bin:/usr/java/jre/bin:/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/openwin/bin:/usr/dt/bin:/usr/platform/SUNW,Sun-Fire-V210/sbin:/opt/sun/bin:/opt/SUNWvts/bin
PS1=root@idmux01 #
PS2=root@idmux01 >
SHELL=/sbin/sh
SSH_CLIENT=*************
SSH_CONNECTION=**********************
SSH_TTY=/dev/pts/4
TERM=xterm
TWO_TASK=
TZ=America/Menominee
USER=root

How would I change environment variables setting?

Last edited by Scott; 04-25-2014 at 12:40 PM.. Reason: Use code tags, please...
# 18  
Old 04-25-2014
give us the output for below commands
Code:
awk '$0 ~ /^root/' /etc/passwd
cat /.profile


Last edited by SriniShoo; 04-25-2014 at 11:31 AM.. Reason: quote correction
# 19  
Old 04-25-2014
awk '$0 ~ /^root/' /etc/passwd
root:x:0:0:Super-User:/:/sbin/sh
Code:
cat /.profile
#
# Initial EIS settings for user root
# This file is set up by the setup-standard script.
#
# In the unlikely event that the EIS profile settings are not
# required, comment out the few lines below.
#
# Version 14MAY04
#

#
#       Source the EIS settings if present
#
if [ -f $HOME/.profile-EIS ]
then
    echo "Sourcing $HOME/.profile-EIS....."
    . $HOME/.profile-EIS
fi

#
#       Remove #NOHEAD from next section for cluster node or domain
#
#NOHEAD if [ "`tty`" = "/dev/console" ]
#NOHEAD then
#NOHEAD     TERM=vt100
#NOHEAD     export TERM
#NOHEAD     echo ""
#NOHEAD     echo "TERM=$TERM"
#NOHEAD     echo ""
#NOHEAD else
#NOHEAD     LOGINFROM=`who am i | cut -f2 -d"(" | cut -f1 -d")"`
#NOHEAD     DISPLAY=${LOGINFROM}:0.0
#NOHEAD     export LOGINFROM DISPLAY
#NOHEAD     echo ""
#NOHEAD     echo "DISPLAY=$DISPLAY"
#NOHEAD     echo ""
#NOHEAD fi

JAVA_HOME=/usr/java
PATH=$JAVA_HOME/bin:$PATH
ORACLE_BASE=/space/home/oracle
export JAVA_HOME PATH

LD_LIBRARY_PATH=/usr/ar/idmux01/eaton/api/lib:/usr/java/bin:/usr/java/lib:/usr/j           ava/jre:/space/home/apache-tomcat-5.5.23/apache-tomcat-5.5.23/webapps/arsys/WEB-           INF/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

CATALINA_HOME=/space/home/apache-tomcat-5.5.23/apache-tomcat-5.5.23
export CATALINA_HOME

ORA_INVENTORY=$ORACLE_BASE/oraInventory
ORACLE_HOME=$ORACLE_BASE/database/product/10.2.0/Db_1
ORACLE_SID=eaton
TWO_TASK=eaton
LD_LIBRARY_PATH=$ORACLE_HOME:$LD_LIBRARY_PATH
PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_BASE ORACLE_HOME LD_LIBRARY_PATH PATH
export ORACLE_SID TWO_TASK
BMC_SLM_JAVA_HOME=/usr/java
export BMC_SLM_JAVA_HOME


Last edited by Scott; 04-25-2014 at 12:40 PM.. Reason: Code tags
# 20  
Old 04-25-2014
Code:
echo "ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_HOME;" >> /.profile

---------- Post updated at 11:01 AM ---------- Previous update was at 11:00 AM ----------

Logout and login after you run the above commands
This User Gave Thanks to SriniShoo For This Post:
# 21  
Old 04-25-2014
It worked. I logged in as root and typed env and it gave me this:
Code:
BMC_SLM_JAVA_HOME=/usr/java
CATALINA_HOME=/space/home/apache-tomcat-5.5.23/apache-tomcat-5.5.23
DISPLAY=localhost:10.0
EDITOR=vi
HOME=/
JAVA_HOME=/usr/java
LD_LIBRARY_PATH=/space/home/oracle/database/product/10.2.0/Db_1:/usr/ar/idmux01/                    eaton/api/lib:/usr/java/bin:/usr/java/lib:/usr/java/jre:/space/home/apache-tomca                    t-5.5.23/apache-tomcat-5.5.23/webapps/arsys/WEB-INF/lib:/usr/openwin/lib
LOGNAME=root
MAIL=/var/mail//root
MANPATH=:/usr/man:/usr/share/man:/opt/SUNWvts/man
OPENWINHOME=/usr/openwin
ORACLE_BASE=/space/home/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
ORACLE_SID=eaton
PATH=/space/home/oracle/database/product/10.2.0/Db_1/bin:/usr/java/bin:/usr/java                    /bin:/usr/java/jre/bin:/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/openwin/bin:/usr/dt/                    bin:/usr/platform/SUNW,Sun-Fire-V210/sbin:/opt/sun/bin:/opt/SUNWvts/bin
PS1=root@idmux01 #
PS2=root@idmux01 >
SHELL=/sbin/sh
SSH_CLIENT=10.16.132.64 52004 22
SSH_CONNECTION=10.16.132.64 52004 10.16.1.233 22
SSH_TTY=/dev/pts/4
TERM=xterm
TWO_TASK=eaton
TZ=America/Menominee
USER=root

---------- Post updated at 10:38 AM ---------- Previous update was at 10:12 AM ----------

Thank you so much everybody specially SriniSHOO for helping me out. You have been an amazing help. I was able to set environment according to the needs and everything seems to be working just fine now.

Thanks a million

Last edited by Scott; 04-25-2014 at 12:40 PM.. Reason: 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