Home » RDBMS Server » Server Administration » Set up two different Oracle Home  () 2 Votes
icon6.gif  Set up two different Oracle Home [message #149926] Mon, 05 December 2005 13:50 Go to next message
Chintu007
Messages: 10
Registered: February 2005
Junior Member
I am trying to create two different oracle homes (Oracle 9i and Oracle 10g) on Suse Linux (SLES 9). Has any body done this? If so, are you willing to share your experience with me? Basically I would like to know that did you create two different oracle homes in same oracle base? What I mean is,

/Home/Oracle
/product/oracle9i
/product/oracle10g


OR

/Home/oracle9i
/product/oracle

/Home/oracle10g
/product/oracle

Also, how do you set up listener? How do you set up oratab file?


Any input would be appreciated.
Re: Set up two different Oracle Home [message #149932 is a reply to message #149926] Mon, 05 December 2005 14:27 Go to previous messageGo to next message
nmacdannald
Messages: 460
Registered: July 2005
Location: Stockton, California - US...
Senior Member
You can create vertical enviroments by defining enviromentals at login of each software's owner.

I have two users on one server that each own a single database, and they don't know about each other.

Some of the main enviromentals are sid and ORACLE_HOME.

If you want I can send you an example of a vertical environment login script for KSH(Solaris, I know it is not Linux but it is close).
Re: Set up two different Oracle Home [message #149933 is a reply to message #149926] Mon, 05 December 2005 14:37 Go to previous messageGo to next message
nmacdannald
Messages: 460
Registered: July 2005
Location: Stockton, California - US...
Senior Member
For the listener you log in as the user that owns the database and start/stop(i.e. lsnrctl start) it.

I used different ports for each database's listener. I think you can use the same port and name the sid you are talking to but I do not.

Do you need an example of the listener file?

cat listener.ora
...
a bunch a stuff that is not needed
....
then:


LISTENER =
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522))
(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
SID_LIST_os2t
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
BEQUEATH CONFIG
(GLOBAL_DBNAME=os2t.deltacollege.edu)
(SID_NAME=os2t)
(ORACLE_HOME=/u04/app/oracle/product/10.1.0.2
(PRESPAWN_MAX=20)
(PRESPAWN_LIST=
(PRESPAWN_DESC=(PROTOCOL=tcp)(POOL_SIZE=2)(TIMEOUT=1))
)
)
)

Re: Set up two different Oracle Home [message #149945 is a reply to message #149932] Mon, 05 December 2005 15:12 Go to previous messageGo to next message
Chintu007
Messages: 10
Registered: February 2005
Junior Member
Hello,
Thanks for you quick response. Could you please send me the script the one you talked about? Also, can you explain little more detail about "vertical enviroments"? Is this an OS level or database level?
If you can not send me the script here then please email me directly @ daxesh007007@yahoo.com

Thanks again,
Daxesh
Re: Set up two different Oracle Home [message #149961 is a reply to message #149926] Mon, 05 December 2005 16:32 Go to previous message
nmacdannald
Messages: 460
Registered: July 2005
Location: Stockton, California - US...
Senior Member
Unix supports a vertical environment at the O/S level. This means you can setup a virtual machine(environment) that knows nothing (except what you choose to tell it) about the other environments that are running. Here is an example of a .profile, which runs when the Oracle software owner logs into the server using KSH. In this case the user is named os2t102 and he owns our Oracle test database software. You will need entries in the oratab for each database, that is shared by all Oracle environments.

>cat .profile
MAIL=/usr/mail/${LOGNAME:?}
set umask 022
#
###
#set terminal charistics
#
stty istrip
stty columns 80
stty rows 36
set -o emacs
#DISPLAY=solarsystem:0.0
#export DISPLAY
#
###
ORACLE_BASE=/u04/os2t/app/oracle/
export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2
export ORACLE_HOME
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/ccs/lib:/usr/dt/lib:/usr/lib:$ORACLE_HOME/jdbc/lib$ORACLE_HOME/lib32
export LD_LIBRARY_PATH
TMPDIR=/var/tmp
export TMPDIR
ORACLE_SID=os2t
export ORACLE_SID
ORACLE_TERM=vt220
export ORACLE_TERM
CLASSPATH=$ORACLE_HOME/jdbc/lib/classes111.zip
export CLASSPATH
#
###
# Set environmentals for util
###
UNZ_DIR=$ORACLE_HOME/oraunzip
export UNZ_DIR
#
###
# Add to the PATH env
### Original Path...
PATH=/sbin:/usr/sbin:$ORACLE_HOME:$ORACLE_HOME/bin:/export/home/orat102:/export/home/scripts:/opt/csw/bin:/bin:/usr/sbin:/usr/bin:/us r/ccs/bin:/usr/ucb:/etc:/usr/lib/lp/postscript:/usr/bin/unzip:/usr/local/bin:/u04/oradata/os2t/102:/usr/openwin/bin:/usr/gnome:/opt/s fw/bin/:/usr/dt/bin/:u05/oracle/os2t/budir
export PATH
#
###
# Put in some env's for ease of navation and such
###
GNET=$TNS_ADMIN
export GNET
GDB=$ORACLE_HOME/rdbms/admin
export GDB
GOH=$ORACLE_HOME
export GOH
GWEB=$ORAWEB_HOME
export GWEB
SQLPATH=$ORACLE_HOME/
export SQLPATH
#
###
# Set environmentals for util
####
###
# Add to the PATH env
###
# If possible, start the windows system
#
if [ `tty` = "/dev/console" ] ; then
if [ "$TERM" = "sun" -o "$TERM" = "AT386" ] ; then

if [ ${OPENWINHOME:-""} = "" ] ; then
OPENWINHOME=/usr/openwin
export OPENWINHOME
fi

echo ""
echo "Starting OpenWindows in 5 seconds (type Control-C to interrupt)"
sleep 5
echo ""
$OPENWINHOME/bin/openwin

clear # get rid of annoying cursor rectangle
exit # logout after leaving windows system

fi
fi
ORAENV_ASK=NO
. /export/home/orat10/scripts/orafuncds
. /export/home/orat10/scripts/don-funcds
MANPATH=$MANPATH:/usr/share/man
export MANPATH
PS1="[`hostname`:$LOGNAME]$"
date
who -u
stty erase ^?
set -o vi

PS1="
`whoami`*\${ORACLE_SID}-\${PWD}
>"

export EDITOR=vi

ulimit -n 1024


Each ORACLE_HOME has its own listener using different ports.

Here is a tnsnames.ora:

>cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u04/app/oracle/product/10.2/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
# os2t = test
# os2p = production
#
os2t =
(DESCRIPTION =
(ADDRESS = (PROTOCOL= TCP)(Host= solarsystem.deltacollege.edu)(Port= 1522))
(CONNECT_DATA = (SID = os2t))
)
os2p =
(DESCRIPTION =
(ADDRESS = (PROTOCOL= TCP)(Host= solarsystem.deltacollege.edu)(Port= 1521))
(CONNECT_DATA = (SID = os2p))
)


Previous Topic: Backup repository
Next Topic: Setting previliges for user account with Oracle10g
Goto Forum:
  


Current Time: Sun Jan 26 13:30:54 CST 2025