Oracle start up script issue with RHEL3 Cluster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all

I am running two node active/passive cluster on RHEL3U8-64 bit
operating system for my oracle 9i  database.I am facing issue when
cluster fail over to node 2 my oracle start up script not starting up
even though i configured start up script in my cluster configuration
but if i type clustat on node 2  it shows service is started. If i
shift the service manually from node 2 to node 1 or even if rebooted
the node1  my cluster starting up the same  service  properly on node
1.Any one help me to fix out this issue.Below  is my script.

Cluster Version: clumanager-1.2.31-1.x86_64

Note: If i start the same script manually on the node 2 it is starting
the database properly without any error.

/etc/init.d/script_db.sh
#####################################################################################
#!/bin/bash
. /etc/rc.d/init.d/functions

start()	{
	echo "Starting Database"

	su -l oracle -c "sh startdb.sh"
	## Sleep for 2 Minuts ####

#	sleep 120
#	echo " reStarting app"
#        clusvcadm -R application
#        echo " app restarted"

	RETVAL=$?
	return $RETVAL
}


stop()	{
	echo "Stopping  Database"
	
	su -l oracle -c "sh stopdb.sh"

	RETVAL=$?
	return $RETVAL
}

status() {
#DBUP=`ps -ef | grep oracle | grep -v grep | grep -c ora_pmon `
DBUP=`ps -ef | grep -c ora_pmon `
#LSNRUP=`ps -ef | grep oracle | grep 9.2.0  | grep -v grep | grep -c lsnrctl`
LSNRUP=`ps -ef | grep -c lsnrctl`
if [ ${DBUP} -ge 1 ]
then
        if [ ${LSNRUP} -ge 1 ]
        then
                echo "Database Running"
		return 0
        fi
fi
echo "Database  Not Running"
return 1
}


case "$1" in
	start)
	        start
		echo "Start Database complete"
	        ;;
	
	stop)
         	stop
		echo "Database Stopped"
		;;
	restart)
	         stop
	         start
	         ;;
	status)
		status
		;;
	
	*)
	
	echo $" Not Applicable"
	exit 1

esac
echo "exiting script"
exit $RETVAL
###################################################################################
stopdb.sh

/home/oracle/orahome/bin/sqlplus /nolog<<EOF
connect sys/sysxyzcall@xyzcall as sysdba
shutdown immediate;
host lsnrctl stop
quit;
EOF
exit
######################################################################################
startdb.sh
#######################################################################
/home/oracle/orahome/bin/sqlplus /nolog <<EOF
host lsnrctl stop
host lsnrctl start
connect sys/sysxyzcall@xyzcall as sysdba
startup
quit;
EOF
exit
############################################################################

Regards,
Lingu

--
Linux-cluster mailing list
Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster

[Index of Archives]     [Corosync Cluster Engine]     [GFS]     [Linux Virtualization]     [Centos Virtualization]     [Centos]     [Linux RAID]     [Fedora Users]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Camping]

  Powered by Linux