Database Reference
In-Depth Information
echo "Getting the target name for unreachable agents ..."
if [ `emcli get_targets -targets="oracle_emd" | grep Unreach | awk '{ print $5 }' | wc -l` -gt 0 ];
then
echo "Creating a list of agents in an Unreachable state"
emcli get_targets -targets="oracle_emd" | grep Unreachable | awk '{ print $5 }' >${WORKFILE01}
if [ `cat ${WORKFILE01} | wc -l` -gt 0 ]; then
for thisAGENT in `cat ${WORKFILE01}`; do
echo "Attempting to resync ${thisAGENT}"
echo "This will take quite a while, so please be patient"
emcli resyncAgent -agent="${thisAGENT}"
done
else
echo "There are currently no unreachable agents"
fi
else
echo "There are currently no unreachable agents"
fi
ExitCleanly
}
function SecureAllAgents {
# --------------------------------------------------------------------------------------------------
# As the name suggests, this function will secure all your agents using the
# preferred credentials for their host.
# --------------------------------------------------------------------------------------------------
WORKFILE01=/tmp/oem_secure_agents.tmp
CleanUpFiles
emcli login -user=sysman -pass="${SysmanPassword}"
emcli get_targets | grep oracle_emd | sort -u | awk '{ print $4 }' >${WORKFILE01}
emcli secure_agents -agt_names_file=${WORKFILE01} -use_pref_creds
ExitCleanly
}
# ==============================================================================
# User Account Credentials
# ==============================================================================
function SetDBUserCredential {
# --------------------------------------------------------------------------------------------------
# This function will set the normal database preferred credentials to use the
# SYSMAN password defined at the top of this file.
Search WWH ::




Custom Search