background image
<< Remote Host Parameters | Write all of the files >>
<< Remote Host Parameters | Write all of the files >>

Shell script

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
erm_setup.ksh
Remote Mirroring of an Oracle Database Using Data Replicator Software
B-17
echo "MIRROR_NUM=$MIRROR_NUM" >> ${TMP_FILE[0]}
echo "VC_PRIORITY=$VC_PRIORITY" >> ${TMP_FILE[0]}
echo "B1=$B1" >> ${TMP_FILE[0]}
echo "B2=$B2" >> ${TMP_FILE[0]}
echo "B3=$B3" >> ${TMP_FILE[0]}
echo "EB=$EB" >> ${TMP_FILE[0]}
COUNTER=0
while (( COUNTER < MIRROR_NUM )); do
echo "#-----------------------------------" >>
${TMP_FILE[0]}
echo "# Volume Group `expr $((COUNTER+1))` Parameters"
>> ${TMP_FILE[0]}
echo "#-----------------------------------" >>
${TMP_FILE[0]}
echo "VOL_MR[$COUNTER]=${VOL_MR[$COUNTER]}" >>
${TMP_FILE[0]}
echo "VOL_SP[$COUNTER]=${VOL_SP[$COUNTER]}" >>
${TMP_FILE[0]}
echo "VOL_VC[$COUNTER]=${VOL_VC[$COUNTER]}" >>
${TMP_FILE[0]}
echo "VOL_HD[$COUNTER]=${VOL_HD[$COUNTER]}" >>
${TMP_FILE[0]}
echo "VOL_MNT[$COUNTER]=${VOL_MNT[$COUNTER]}" >>
${TMP_FILE[0]}
echo "VOL_TYP[$COUNTER]=SYNC" >> ${TMP_FILE[0]} # Only
supporting synchronous replication
COUNTER=$((COUNTER+1))
done
echo "\n"
cat ${TMP_FILE[0]}
echo "\nThe preceeding is a list of variables that will be used
by the erm.ksh"
echo "shell script."
echo "\nThese variables reside in the file ${B2}$RMT_SCRIPT_DIR/
erm.conf${EB}"
echo "\nIf you need to modify or change these, you can manually
edit the file or"
echo "rerun this erm_setup.ksh shell script to recreate the
file."
echo "\nPress Enter to continue."
read BLANK
echo "\n\nPlease wait, writing files...\c"
cp ${TMP_FILE[0]} $RMT_SCRIPT_DIR/erm.conf >> erm_setup.trace
2>&1
STATUS=$?
chmod 600 $RMT_SCRIPT_DIR/erm.conf >> erm_setup.trace 2>&1
STATUS=$((STATUS+$?))
if [[ $PWD != $RMT_SCRIPT_DIR ]]; then