# setting up menu for ORACLE INSTANCES
export PS1='[\u@\h \W]\$'
SID_CHOICE=0
while [ $SID_CHOICE -lt 1 ] || [ $SID_CHOICE -gt 3 ]
do
echo "which ORACLE_SID?"
echo "1 - DEVTEST"
echo "2 - DEVTEST2"
echo "3 - DEVTEST3"
read SID_CHOICE
done
if [ $SID_CHOICE -eq 1 ]; then
export ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/dbhome_1
export ORACLE_SID=DEVTEST
export ORACLE_BASE=/u01/app/oracle
PATH=${PATH}:${ORACLE_HOME}/bin
CREATE=/u01/app/oracle/create; export CREATE
elif [ $SID_CHOICE -eq 2 ]; then
export ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/dbhome_1
export ORACLE_SID=DEVTEST2
export ORACLE_BASE=/u01/app/oracle
PATH=${PATH}:${ORACLE_HOME}/bin
CREATE=/u01/app/oracle/create; export CREATE
elif [ $SID_CHOICE -eq 3 ]; then
export ORACLE_HOME=/u01/app/oracle/product/12.1.0.1/dbhome_1
export ORACLE_SID=DEV12142
export ORACLE_BASE=/u01/app/oracle
PATH=${PATH}:${ORACLE_HOME}/bin
CREATE=/u01/app/oracle/create; export CREATE
fi
export ORACLE_SID
echo "ORACLE_SID set to $ORACLE_SID"
PS1="[\u@\h \W]\$"
export PS1
which ORACLE_SID?
1 - DEVTEST
2 - DEVTEST2
3 - DEVTEST3
No comments:
Post a Comment