Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Setting up two Oracle home of different version in .profile with a menu

481167Aug 27 2007 — edited Aug 28 2007
Hello guys,

I am using a menu to choose my instances. I.e. after login i am supposed to type "mnu" and i am prompted with options for choosing the instance name running on that server (this is set in the .profile file).
There are sum databases on 9i and sum on 10g on the same server.

Presently i am able to use only 9i databases which are configured in the .profile (for the menu).
Please help me with adding up ORACLE_HOME and selection of oracle 10g databases in this script.

Here is my .profile
THE 10G VERSION OF DATABASE BASE I NEED TO ADD IS
1). PROD
2). APPS
PLEASE HELP ME ADDING THESE TWO DATABASES WITH NEW VERSIONS IN THIS .PROFILE FILE.
--------------------------------------------------------------------------------------------------------------------------

umask 022
clear
EDITOR=vi; export EDITOR
stty intr '^C'
stty kill '^U'
#stty erase '^?'
EPC_DISABLED=TRUE; export EPC_DISABLED
function mnu
{
set -a
ORACLE_HOME=/fs01/app/oracle/product/9.2
ORACLE_SID=SID-NOTSET
PATH=$PATH:/usr/bin:/usr/local/bin:/etc:/usr/ccs/bin:/usr/bin/X11:/fs01/app/oracle/local/bin; export PATH
#PATH=$PATH:/usr/bin:/usr/local/bin:/etc:/usr/ccs/bin:/usr/bin/X11; export PATH
# Fix java issue
PATH="${PATH}:/opt/java/jre/bin"; export PATH
# Fix perl issue
PATH=/opt/perl/bin:$PATH; export PATH

typeset -u CHOICE
while :
do
clear
print "\n\n"
print " VALUATION SERVICES "
print " "
print " Oracle Production Database Environment "
print "\n"
print " 1 ................. ABC (Test Database)\n"
print " 2 ................. DEF (Dev Database)\n"
print "\n"
print " Q ................ Exit Menu"
print "\n\n"
print " Choice : \c"

read CHOICE

case $CHOICE in
1) ORACLE_SID=ABC
break
;;
2) ORACLE_SID=DEF
break
;;
Q) break
;;
esac
done
PATH=$ORACLE_HOME/bin:$PATH
export PS1='<${ORACLE_SID}> $PWD $ '
clear
print "\nType 'mnu' to rerun menu\n"
}

clear
print "\nType 'mnu' to run menu\n"
}
-----------------------------------------------------------------------------------------------------------------------------

null
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 25 2007
Added on Aug 27 2007
9 comments
939 views