Database Reference
In-Depth Information
else
export HAGROUP=`sudo ${VCSBIN}/hastatus -summary | grep OFFLINE | grep ${1} | awk '{ print $2 }'`
export OFFLINE_NODE=`sudo ${VCSBIN}/hastatus -summary | grep OFFLINE | grep ${HAGROUP} | awk
'{ print $3 }'`
if [ `sudo ${VCSBIN}/hastatus -summary | grep ONLINE | grep ${HAGROUP} | wc -l` -gt 0 ]; then
export ONLINE_NODE=`sudo ${VCSBIN}/hastatus -summary | grep ONLINE | grep ${HAGROUP} | awk
'{ print $3 }'`
else
export ONLINE_NODE=`sudo ${VCSBIN}/hastatus -summary | grep PARTIAL | grep ${HAGROUP} | awk
'{ print $3 }'`
fi
fi
# --------------------------------------------------------------------------------------------------
# Echo those values for the log file
# --------------------------------------------------------------------------------------------------
echo "\n\nVeritas Cluster names:"
echo " VCS group ${HAGROUP}"
echo " Active node after relocation ${ONLINE_NODE}"
echo " Offline node ${OFFLINE_NODE}"
echo " Local hostname ${LOCAL_HOST}"
# --------------------------------------------------------------------------------------------------
# Select the database and listener names associated with the HAGROUP
# This list may not match the list of targets known to OEM on these hosts, so we'll compare
# them later in the script
# --------------------------------------------------------------------------------------------------
sudo ${VCSBIN}/hares -display -type Oracle | grep ${HAGROUP} | awk '{ print $1 }' >${VCS_DATABASES}
sudo ${VCSBIN}/hares -display -type Netlsnr | grep ${HAGROUP} | awk '{ print $1 }' >${VCS_LISTENERS}
if [ `cat ${VCS_DATABASES} | wc -l` -gt 0 ]; then
echo "\n\nVCS shows these databases in ${HAGROUP} group"
thisFILE=${VCS_DATABASES}
ListNicely
else
echo "\n\nVCS has no databases associated with ${HAGROUP} group"
ExitDirty
Fi
if [ `cat ${VCS_LISTENERS} | wc -l` -gt 0 ]; then
echo "\n\nVCS shows these listeners in ${HAGROUP} group"
thisFILE=${VCS_LISTENERS}
ListNicely
Else
echo "\n\nVCS has no listeners associated with ${HAGROUP} group"
fi
if [ ${OFFLINE_NODE} == ${LOCAL_HOST} ]; then
echo "\n\nThe ${HAGROUP} group is located on the other side of the cluster"
echo "This script must be run on the active node ${ONLINE_NODE}\n\n\n"
ExitDirty
Fi
Search WWH ::




Custom Search