FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 11-15-2008, 06:28 PM
lingu
 
Default 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
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-15-2008, 06:29 PM
lingu
 
Default 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@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 11-15-2008, 07:25 PM
"Lanny Marcus"
 
Default Oracle start up script issue with RHEL3 Cluster

On Sat, Nov 15, 2008 at 2:28 PM, lingu <hicheerup@gmail.com> wrote:
> 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
<snip>
Have you considered posting to a mailing list for RHEL? This list is
for CentOS users.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-16-2008, 12:53 PM
lingu
 
Default Oracle start up script issue with RHEL3 Cluster

Hi lanny,

Thank a lot for your valuale information also we are getting lot
of mails in this mailing list about debian,ubuntu,knopix and even the
microsoft and the people are getting help for such mails too .I dont
think anything wrong about posting RHEL related issue on this list,
also i thought you know very well centos is the clone of RHEL .


On 11/16/08, Lanny Marcus <lmmailinglists@gmail.com> wrote:
> On Sat, Nov 15, 2008 at 2:28 PM, lingu <hicheerup@gmail.com> wrote:
> > 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
> <snip>
> Have you considered posting to a mailing list for RHEL? This list is
> for CentOS users.
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-16-2008, 01:39 PM
"Lanny Marcus"
 
Default Oracle start up script issue with RHEL3 Cluster

On Sun, Nov 16, 2008 at 8:53 AM, lingu <hicheerup@gmail.com> wrote:
> Thank a lot for your valuale information also we are getting lot
> of mails in this mailing list about debian,ubuntu,knopix and even the
> microsoft and the people are getting help for such mails too .I dont
> think anything wrong about posting RHEL related issue on this list,
> also i thought you know very well centos is the clone of RHEL .

Yes, I know that CentOS is a clone of RHEL. But, if you paid for RHEL,
probably you have a right to their support. If not, to participate in
their mailing lists. On a weekend, you probably will get a quicker
reply from a RH mailing list than this one. Many of the experts who
participate in this list are not around on the weekends.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-16-2008, 02:49 PM
Vandaman
 
Default Oracle start up script issue with RHEL3 Cluster

Lanny Marcus wrote:

> Have you considered posting to a mailing list for RHEL?
> This list is
> for CentOS users.
>

This is one of those situations where if you have nothing
useful to say it is best to keep quiet. What about those
in the CentOS forums asking for help after their subscriptions
have run out? Or what business is it of yours if someone is
running RHEL as opposed to a RHEL-derivative?

Regards,
Vandaman.




_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-16-2008, 02:49 PM
Vandaman
 
Default Oracle start up script issue with RHEL3 Cluster

Lanny Marcus wrote:

> Have you considered posting to a mailing list for RHEL?
> This list is
> for CentOS users.
>

This is one of those situations where if you have nothing
useful to say it is best to keep quiet. What about those
in the CentOS forums asking for help after their subscriptions
have run out? Or what business is it of yours if someone is
running RHEL as opposed to a RHEL-derivative?

Regards,
Vandaman.




_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-16-2008, 04:30 PM
Yong Huang
 
Default Oracle start up script issue with RHEL3 Cluster

Lingu,

Can you check whether the script /etc/init.d/script_db.sh is called at all? After failover, see if the file last access time was about the failover time or much earlier (ls -ltu). Or add some lines like

/usr/bin/date > /tmp/mylog
/usr/bin/env | /usr/bin/sort >> /tmp/mylog

to that script. If that script is called, how about startdb.sh? If that's called too, check Oracle's alert_<DBSID>.log under Oracle's bdump directory.

Yong Huang

> 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@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 11-16-2008, 04:34 PM
Ian Forde
 
Default Oracle start up script issue with RHEL3 Cluster

On Sun, 2008-11-16 at 09:39 -0500, Lanny Marcus wrote:
> On Sun, Nov 16, 2008 at 8:53 AM, lingu <hicheerup@gmail.com> wrote:
> > Thank a lot for your valuale information also we are getting lot
> > of mails in this mailing list about debian,ubuntu,knopix and even the
> > microsoft and the people are getting help for such mails too .I dont
> > think anything wrong about posting RHEL related issue on this list,
> > also i thought you know very well centos is the clone of RHEL .
>
> Yes, I know that CentOS is a clone of RHEL. But, if you paid for RHEL,
> probably you have a right to their support. If not, to participate in
> their mailing lists. On a weekend, you probably will get a quicker
> reply from a RH mailing list than this one. Many of the experts who
> participate in this list are not around on the weekends.

In addition, Red Hat Cluster isn't cheap. It's usually a pretty safe
assumption that if one has it deployed, then one has an active service
contract with RH, and thus has access to the official support
channels... which is why RHCS knowledge hasn't really percolated out to
the CentOS crowd to the degree that it has on the RHEL lists...

-I

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-16-2008, 07:31 PM
Kai Schaetzl
 
Default Oracle start up script issue with RHEL3 Cluster

Vandaman wrote on Sun, 16 Nov 2008 15:49:51 +0000 (GMT):

> This is one of those situations where if you have nothing
> useful to say it is best to keep quiet.

Indeed. Look in a mirror and say it again.


Kai

--
Kai Schätzl, Berlin, Germany
Get your web at Conactive Internet Services: http://www.conactive.com



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 10:24 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org