Operating System - HP-UX
1752721 Members
7054 Online
108789 Solutions
New Discussion

How to stop temporarily db wihout stop cluster

 
SOLVED
Go to solution
Carme Torca
Super Advisor

How to stop temporarily db wihout stop cluster

Hi,

 

I have this version of cluster

Cluster-Monitor                       A.11.16.00     HP Cluster Monitor

with one oracle db in one package.

 

Is it possible to stop and start de bbdd without stop the package. I don't known if the file oracle.debug its ok for this version or maybe I have to disable the package o something like that.

 

Thanks a lot of,

Carmen.

Users are not too bad ;-)
4 REPLIES 4
Solution

Re: How to stop temporarily db wihout stop cluster

Carme,

 

The "debug flag", which allows you to halt an application without halting its package has been implemented in different ways over the years, and it is generally a function of the package control script rather than Serviceguard itself.

 

So the only way you are going to be able to figure this out is to :

 

  1. look at the cluster configuration and check if you are actuallu monitoring the database at all
  2. if you are monitoring the database, look at the monitor scrip and see if it checks for a debug flag

Looking at what you have posted above I'm guessing you are running Serviceguard 11.16 (on HP-UX11.11 or 11.23?), so here's what you will need to do:

 

1. Identify the package name using cmviewcl:

# cmviewcl -l package

    PACKAGE      STATUS       STATE        AUTO_RUN     NODE
    dbsrc        up           running      enabled      c3000
    dbtgt        up           running      enabled      c3000

 

2. Look at the package configuration and see if you have any monitors running - the package I'm interested in in dbsrc:

# cmviewcl -vp dbsrc

    PACKAGE      STATUS       STATE        AUTO_RUN     NODE
    dbsrc        up           running      disabled     c3000

      Policy_Parameters:
      POLICY_NAME     CONFIGURED_VALUE
      Failover        configured_node
      Failback        manual

      Script_Parameters:
      ITEM       STATUS   MAX_RESTARTS  RESTARTS   NAME
      Service    up                  0         0   dbsrc_monitor
      Subnet     up                                192.168.1.0

      Node_Switching_Parameters:
      NODE_TYPE    STATUS       SWITCHING    NAME
      Primary      up           enabled      c3000        (current)

 Note that I have a service named dbsrc_monitor - this could be monitoring whether my database is up or not...

 

3. So I need to find the code for that monitor - first I need to find the name of the package control file - I can get that from a cmgetconf:

# cmgetconf -p dbsrc | grep RUN_SCRIPT
RUN_SCRIPT                      /etc/cmcluster/dbsrc/dbsrc.sh
RUN_SCRIPT_TIMEOUT              NO_TIMEOUT

4. And if I then look in the file /etc/cmcluster/dbsrc/dbsrc.sh I should find what code is called to execute the monitor:

 

# sed -n -e '/dbsrc_monitor/{ N; p; }' /etc/cmcluster/dbsrc/dbsrc.sh
SERVICE_NAME[0]="dbsrc_monitor"
SERVICE_CMD[0]="/etc/cmcluster/dbsrc/monitor.sh"

 Note that bit of sed is assuming that the SERVICE_CMD variable appears on the next line of dbsrc.sh - it doesn't have to, but you could always just inspect the file using vi or more...

 

5. So we now know that the code for the monitoring function is in the file /etc/cmcluster/dbsrc/monitor.sh - you'll have to inspect that file to figure out if there is any code in there that will allow you to stop the database without causing the monitor to exit (and cause a failover to happen)

 

If you get stuck with the code in the monitor, post here and we can help...

 

 

 


I am an HPE Employee
Accept or Kudo
Carme Torca
Super Advisor

Re: How to stop temporarily db wihout stop cluster

Hi,

I have 11.11 and I have:

# cmviewcl -vp lot1pkg1

    PACKAGE      STATUS       STATE        AUTO_RUN     NODE
    lot1pkg1     up           running      enabled      serv1

      Policy_Parameters:
      POLICY_NAME     CONFIGURED_VALUE
      Failover        configured_node
      Failback        manual

      Script_Parameters:
      ITEM       STATUS   MAX_RESTARTS  RESTARTS   NAME
      Subnet     up                                10.30.223.232

      Node_Switching_Parameters:
      NODE_TYPE    STATUS       SWITCHING    NAME
      Primary      up           enabled      serv1       (current)
      Alternate    up           enabled      serv2

#cmgetconf -p lot1pkg1 | grep RUN_SCRIPT
RUN_SCRIPT                      /etc/cmcluster/lot1pkg1/lot1pkg1.cntl
RUN_SCRIPT_TIMEOUT              NO_TIMEOUT


/etc/cmcluster/lot1pkg1/lot1pkg1.cntl

 #SERVICE_NAME[0]=""
 #SERVICE_CMD[0]=""

So I cannot stop db without stop the pakage? Maybe I can do # cmmodpkg -d lot1pkg1 ?

 

Thanks a lot of,

Carmen.

Users are not too bad ;-)

Re: How to stop temporarily db wihout stop cluster

Looking at this section of your cmviewcl output:

 

      Script_Parameters:
      ITEM       STATUS   MAX_RESTARTS  RESTARTS   NAME
      Subnet     up                                10.30.223.232

It looks like you have no monitor running at all for the database. So I think you can go ahead and stop the database anyway, and the package should not failover. You will of course have to manually restart the database when you are done with whatever maintenance work you wanted to carry out.


I am an HPE Employee
Accept or Kudo
Steven E. Protter
Exalted Contributor

Re: How to stop temporarily db wihout stop cluster

Shalom,

This is a 1 package cluster without monitoring.

Functionally there is no difference between stopping the cluster and the database.

This is an application outage no matter how you look at it.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com