RMANCAT Automatic Startup Working


I finally got the Listener, ASM, and RMANCAT instance to start up automatically on rmancat by having the following line in /etc/rc.d/rc.local :

su - oracle -c "/home/oracle/bin/startup.sh >>/home/oracle/log/startup.log 2>&1" &

The most important part is the & at the end because this allows the startup process to continue and initialise css without which ASM cannot start.

The startup.sh script has the following snippet to check for css availability:

NUM_CSSD_CHECKS="0"
MAX_CSSD_CHECKS="900"
SLEEP_CSSD_CHECKS="10"
TIMEOUT_CSSD_CHECKS=$[ $MAX_CSSD_CHECKS * $SLEEP_CSSD_CHECKS ]
while [ "$($CRSCTL check cssd 2>/dev/null)" != "CSS appears healthy" ]; do
NUM_CSSD_CHECKS=$[ $NUM_CSSD_CHECKS + 1 ]
if [ "$NUM_CSSD_CHECKS" -gt "$MAX_CSSD_CHECKS" ]; then
echo "$(date +%F:%T) $0 CSSD is not ready after $TIMEOUT_CSSD_CHECKS seconds - exiting"
unset NUM_CSSD_CHECKS
unset MAX_CSSD_CHECKS
exit 1
fi
sleep ${SLEEP_CSSD_CHECKS}s
done

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s