Requirement install the oracle 11.2.0.3 on the server on
which oracle 10.2.0.3 was already installed.
There were two
options one is to create the different user at OS level & install the
Oracle 11g, Other is to install the Oracle 11g under
the same user with
Oracle 10g installed,
I have tried the 2nd
option, but there was issue of the profile at the time of version selection, so
i have created the script which will run
at the user (ORACLE
USER) logon which will ask which version you have to select, so that oracle
will login to perticular version which is selected e.g.
Enter your choice
For oracle 10g enter
1
oracle 11g enter 2
We can create this by
writing the shell script,
Below i have to
select the Oracle 10g, I have selected option 1.
It will run oracle10g profile.
Next, If i have to select the oracle
11g, we will select the option 2,
This will login to oracle11g profile.
Following is the script for the above
automation.
. .bash_profile
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.
export PATH
export HOST=$(hostname)
export
PS1=’$USER@$HOST:$PWD]’
export EDITOR=vi
if [ -s “$MAIL”
] # This is at
Shell startup. In normal
then echo “$MAILMSG” # operation, the Shell checks
fi # periodically.
then echo “$MAILMSG” # operation, the Shell checks
fi # periodically.
echo “ “
echo “ “
echo “ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~”
echo “ Database options”
echo “ “
echo “ “
echo “ 1) DATABASE 10g”
echo “ “
echo “ 2) DATABASE 11g”
echo “ “
echo “ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~”
echo “ “
echo “ “
echo “ Enter Choice:\c”
read env
if [ $env -eq 1 ] ; then
export ORACLE_HOME=/u01/apps/oracle/product/10.2.0/db_1
export ORACLE_BASE=/u01/apps/oracle
export EPC_DISABLE=true
AIXTHREAD_SCOPE=S; export AIXTHREAD_SCOPE
echo “ “
echo “ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~”
echo “ Database options”
echo “ “
echo “ “
echo “ 1) DATABASE 10g”
echo “ “
echo “ 2) DATABASE 11g”
echo “ “
echo “ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~”
echo “ “
echo “ “
echo “ Enter Choice:\c”
read env
if [ $env -eq 1 ] ; then
export ORACLE_HOME=/u01/apps/oracle/product/10.2.0/db_1
export ORACLE_BASE=/u01/apps/oracle
export EPC_DISABLE=true
AIXTHREAD_SCOPE=S; export AIXTHREAD_SCOPE
else
if [ $env -eq 2 ] ; then
export ORACLE_HOME=/u01/apps/oracle/11.2.0.3
export ORACLE_BASE=/u01/apps/oracle/
export EPC_DISABLE=true
AIXTHREAD_SCOPE=S; export AIXTHREAD_SCOPE
fi
if [ $env -eq 2 ] ; then
export ORACLE_HOME=/u01/apps/oracle/11.2.0.3
export ORACLE_BASE=/u01/apps/oracle/
export EPC_DISABLE=true
AIXTHREAD_SCOPE=S; export AIXTHREAD_SCOPE
fi
fi
export EPC_DISABLE=true
#export ORACLE_HOME=/u01/apps/oracle/product/10.2.0/db_1
PATH=$ORACLE_HOME/bin:$PATH; export PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_CLASSPATH=$ORACLE_HOME/jdbc/lib/classes12.jar
#export ORACLE_HOME=/u01/apps/oracle/product/10.2.0/db_1
PATH=$ORACLE_HOME/bin:$PATH; export PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_CLASSPATH=$ORACLE_HOME/jdbc/lib/classes12.jar
export
NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat
export ADM=/apps/oracle/admin
export ADM=/apps/oracle/admin
AIXTHREAD_SCOPE=S;
export AIXTHREAD_SCOPE
set -o vi
echo “
echo “
clear
echo
echo “
clear
echo
No comments:
Post a Comment