On an HACMP cluster with 2 resources, if you want to use dependencies to start one resource before the other, you have to use an “Application Monitor”.
# smitty hacmp --> Extended Configuration --> Extended Resource Configuration --> Configure Resource Group Run-Time Policies --> Configure Dependencies between Resource Groups --> Configure Parent/Child Dependency --> Add Parent/Child Dependency between Resource Groups
Select the Parent Resource Group oradbdbrg oradbrtrg
Select the Child Resource Group oradbrtrg
Add Parent/Child Dependency between Resource Groups * Parent Resource Group [oradbdbrg] + * Child Resource Group [oradbrtrg] +
[root@oraclu1]/home/scripts# cat monitordb.sh #!/usr/bin/ksh logpath=`dirname $0` sn=`basename $0 | cut -d. -f1` logname=$logpath/$sn.log NUM=`date "+%d-%m-%Y %H:%M:%S"` process="/usr/sbin/writesrv" ps -ef | grep "$process" | grep -v grep > /dev/null 2>&1 if [ $? -eq 0 ] then echo "OK: $NUM process $process found" >> $logname exit 0 else echo "NOK: $NUM process $process not found" >> $logname exit 1 fi
# smitty hacmp --> Extended Configuration --> Extended Resource Configuration --> HACMP Extended Resources Configuration --> Configure HACMP Applications Servers --> Configure HACMP Application Monitoring --> Configure Custom Application Monitors --> Add a Custom Application Monitor
Add Custom Application Monitor * Monitor Name oradbdbmon Application Server(s) to Monitor oradbdbapp + * Monitor Mode [Startup Monitoring] + * Monitor Method [/home/scripts/monitordb.sh] Monitor Interval [60] # Hung Monitor Signal [9] # * Stabilization Interval [300] # Restart Count [0] # Restart Interval [0] # * Action on Application Failure [notify] + Notify Method [] Cleanup Method [] Restart Method []