The Oracle oratab directory
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The
sun_erm_setup.ksh
Script
Remote Mirroring of an Oracle Database Using Data Replicator Software
C-35
# Get Oracle User ID
TMP_ID=oracle
STATUS=1
while (( STATUS != 0 )); do
echo "\nEnter the Oracle user ID on $PRI_HOST:
[`tput sc`$TMP_ID]`tput rc`\c"
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=/var/opt/oracle
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}')
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