Oracle start up script issue with RHEL3 Cluster



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

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



Relevant Pages

  • Database/Email Script
    ... PHP programmer during the interview. ... Still they have given me a script ... One is read it into a database. ... echo "Email was successfully sent"; ...
    (comp.lang.php)
  • Re: Oracle start up script issue with RHEL3 Cluster
    ... If that script is called, ... the database properly without any error. ... echo "Starting Database" ... exit $RETVAL ...
    (RedHat)
  • Re: How do I get this out?
    ... There are so many ways to retirve information from a database. ... I use a loop for the most of the time. ... echo $linkage; ... I've edit the script a bit and got rid of some of the complex scripts ...
    (alt.php)
  • Re: Using HTML_Table
    ... Currently I am using the script below, ... database to display the table info in an HTML table. ... echo mysqli_connect_errno; ...
    (comp.lang.php)
  • Re: [Full-disclosure] reduction of brute force login attempts via SSHthrough iptables --
    ... Anyhow its no problem at all to modify, so if you dont like it, just dont use it. ... on a lame script like this as long as it WORKS and is not insecure. ... echo "~ sorting out ip by ip" ... # echo "not enough failed logins, probably no attack from: ...
    (Full-Disclosure)