background image
<< Primary host information | Get Oracle Base directory >>
<< Primary host information | Get Oracle Base directory >>

Get Oracle oratab location

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
erm_setup.ksh
Remote Mirroring of an Oracle Database Using Data Replicator Software
B-5
read PRI_DB_ID
if [[ ! -n $PRI_DB_ID ]]; then
PRI_DB_ID=$TMP_ID
fi
echo "Database owner ID = ${B2}$PRI_DB_ID${EB}"
prompt_usr
STATUS=$?
done
# Get Oracle oratab location
TMP_ORATAB=/etc
STATUS=1
while (( STATUS != 0 )); do
echo "\nEnter the Oracle oratab directory on $PRI_HOST [`tput
sc`$TMP_ORATAB]`tput rc`\c"
read ORA_ORATAB
if [[ ! -n $ORA_ORATAB ]]; then
ORA_ORATAB=$TMP_ORATAB
fi
echo "Oracle oratab directory = ${B2}$ORA_ORATAB${EB}"
prompt_usr
STATUS=$?
done
# Get Oracle SID
TMP_SID=$(rsh $PRI_HOST -l $PRI_DB_ID grep -v '\#' $ORA_ORATAB/
oratab | grep ':' | head -1 | awk -F':' '{print $1}') > /dev/null
2>&1
STATUS=1
while (( STATUS != 0 )); do
echo "\nEnter the Oracle SID (ORACLE_SID) to use [`tput
sc`$TMP_SID]`tput rc`\c"
read ORA_SID
if [[ ! -n $ORA_SID ]]; then
ORA_SID=$TMP_SID
fi
echo "Oracle SID = ${B2}$ORA_SID${EB}"
prompt_usr
STATUS=$?
done
# Get Oracle Home directory
TMP_HOME=$(rsh $PRI_HOST -l $PRI_DB_ID grep -v '\#' $ORA_ORATAB/
oratab | grep $ORA_SID | head -1 | awk -F':' '{print $2}') > /
dev/null 2>&1