Database Reference
In-Depth Information
for thisITEM in `cat ${MOVING_DATABASES}`; do
EMCLI_TARGET_STRING=`echo "-target_name=\"${thisITEM}\" -target_type=\"oracle_database\""`
echo "set_standby_agent ${EMCLI_AGENT_STRING} ${EMCLI_TARGET_STRING}" >>${EMCLI_SCRIPT}
echo "relocate_targets ${EMCLI_AGENT_STRING} ${EMCLI_TARGET_STRING} -copy_from_src
-force=yes" >>${EMCLI_SCRIPT}
done
else
echo "\n\nNo database targets need to be migrated to ${NEW_EMD}"
fi
if [ `cat ${VCS_LISTENERS} | wc -l` -gt 0 ]; then
cat /dev/null >${MOVING_LISTENERS}
for thisITEM in `cat ${VCS_LISTENERS} | sed 's/lsnr//'`; do
cat ${OEM_LISTENERS} | grep -i ${thisITEM} >>${MOVING_LISTENERS}
done
else
echo "\n\nVCS has no listeners associated with ${HAGROUP} group"
fi
if [ `cat ${MOVING_LISTENERS} | wc -l` -gt 0 ]; then
echo "\n\nThese listener targets will be relocated to ${NEW_EMD}"
thisFILE=${MOVING_LISTENERS}
ListNicely
for thisITEM in `cat ${MOVING_LISTENERS}`; do
EMCLI_TARGET_STRING=`echo "-target_name=\"${thisITEM}\" -target_type=\"oracle_listener\""`
echo "set_standby_agent ${EMCLI_AGENT_STRING} ${EMCLI_TARGET_STRING}" >>${EMCLI_SCRIPT}
echo "relocate_targets ${EMCLI_AGENT_STRING} ${EMCLI_TARGET_STRING} -copy_from_src"
>>${EMCLI_SCRIPT}
done
else
echo "\n\nNo listener targets need to be migrated to ${NEW_EMD}"
fi
sleep 10
# --------------------------------------------------------------------------------------------------
# Show the emcli to the log file and then execute it with emcli argfile
# --------------------------------------------------------------------------------------------------
if [ `cat ${EMCLI_SCRIPT} | wc -l` -gt 0 ]; then
echo "\n\nEMCLI script"
cat ${EMCLI_SCRIPT}
echo "\n\nEMCLI execution results"
$EMCLI argfile ${EMCLI_SCRIPT}
fi
echo "\n\nThese targets are now tracked by the local OEM agent:\n"
$EMCTL config agent listtargets | grep -v "Cloud" | grep -v "reserved." | sort -fu
echo "\n\n\n"
ExitCleanly
Search WWH ::




Custom Search