Operating System - HP-UX
1748194 Members
4496 Online
108759 Solutions
New Discussion

How to shutdown immediate down Oracle database when on cluster

 
SOLVED
Go to solution
dhman
Occasional Advisor

How to shutdown immediate down Oracle database when on cluster

We have 9i databases on cluster. Below is the structure:

cmviewcl

CLUSTER        STATUS
mycluster      up

  NODE           STATUS       STATE
  node1          up           running

   PACKAGE        STATUS           STATE            AUTO_RUN    NODE
   db1            up               running          disabled    node1

  NODE           STATUS       STATE
  node2          up           running

   PACKAGE        STATUS           STATE            AUTO_RUN    NODE
   db2            up               running          disabled    node2
   db3            up               running          disabled    node2

Now if I want to restart db2 database I issue:

cmhaltpkg db2

cmrunpkg -n node2 db2

Now if I su- oracle and issue:

shutdown immediate;

The cluster will automatically startup the database. How can I avoid this?

Issue

shutdown immediate;

without the cluster intervention, so I can do DB admin work?

8 REPLIES 8
Solution

Re: How to shutdown immediate down Oracle database when on cluster

I have no idea what version of Serviceguard you are running, so will just take a guess that you are running 11.20 (i.e. the latest version) and also that you have the Oracle databases configured using the Serviceguard toolkit for Oracle (rather than just some custom scripts that some folks use). If that is all true then you *should* be able to just place the package in maintenance mode using:

cmmodpkg -m on -n node2 db2

DO what you need to do with Oracle and then turn off maintenance mode using:

cmmodpkg -m off db2

Of course I have no idea if this is how your system is setup, so tread carefully...

 


I am an HPE Employee
Accept or Kudo

Re: How to shutdown immediate down Oracle database when on cluster

For older Serviceguard implementations I think you just created a file called "oracle.debug" in the package directory - so for example if the package directory is /etc/cmcluster/db2 you would just:

touch /etc/cmcluster/db2/oracle.debug

And then remove that file when you are done with Oracle...


I am an HPE Employee
Accept or Kudo
dhman
Occasional Advisor

Re: How to shutdown immediate down Oracle database when on cluster

Thank you Duncan

cmmodpkg executable exists on our setup and our serviceguard version is 11.19.

If I'm not mistaken I believe I can use your first solution. Correct?

Re: How to shutdown immediate down Oracle database when on cluster

That feature was introduced in 11.19 so yes...

My previous concerns about not knowing how your Oracle database has been integrated in Serviceguard remain though... I don't know what "customisations" have been made to your configuration.

Incidentally 11.19 is only still supported on HP-UX11.11 (ut's the last released version on that platform). If you are on 11.23 or 11.31 you need to move to Serviceguard 11.20


I am an HPE Employee
Accept or Kudo
dhman
Occasional Advisor

Re: How to shutdown immediate down Oracle database when on cluster

Thank you again Duncan

Our HPUX version is 11.23.

This setup was made some years ago by unknown person.

We are not experts on Serviceguard but just DBA.

You say that you have concerns about customizations. If they exists what could go wrong if I execute

cmmodpkg -m on -n node2 db2

and then shutdown immedaite the database?

What are these concerns?

 

Re: How to shutdown immediate down Oracle database when on cluster

Figuring that out would mean digging into the package configuration - you could start by posting the text version of the packages conf file - post the output of:

cmgetconf -p db2

I am an HPE Employee
Accept or Kudo
dhman
Occasional Advisor

Re: How to shutdown immediate down Oracle database when on cluster

When I remove all the comments I have this:

 

PACKAGE_NAME                    db2
PACKAGE_TYPE                    FAILOVER
NODE_NAME                       node2
NODE_NAME                       node1
AUTO_RUN                        YES
NODE_FAIL_FAST_ENABLED          NO
RUN_SCRIPT                      /etc/cmcluster/db2/db2.cntl
HALT_SCRIPT                     /etc/cmcluster/db2/db2.cntl
RUN_SCRIPT_TIMEOUT              NO_TIMEOUT
HALT_SCRIPT_TIMEOUT             NO_TIMEOUT
FAILOVER_POLICY                 CONFIGURED_NODE
FAILBACK_POLICY                 MANUAL
PRIORITY                        NO_PRIORITY
LOCAL_LAN_FAILOVER_ALLOWED      YES
MONITORED_SUBNET                192.168.xxx.0
SERVICE_NAME                    DBNAME2
SERVICE_FAIL_FAST_ENABLED       NO
SERVICE_HALT_TIMEOUT            300

Mike_Chisholm
HPE Pro

Re: How to shutdown immediate down Oracle database when on cluster

That "RUN_SCRIPT /etc/cmcluster/db2/db2.cntl" entry indicates this is a legacy style package, not modular. Which means maintenance mode is not going to work.

If you are using the Oracle Toolkit, you can possibly create an "oracle.debug" file in the package directory (probably /etc/cmcluster/db2/) and this will disable package monitoring so theoretically you can halt the database outside of the package and the package will stay up. But again, you are on an old version and we don't know what version of the Enterprise Cluster Master Toolkit (if any) you are integrated with.

What is it exactly that you are trying to accomplish? Why do you need the package to stay up while you bring down the DB? If you just need the filesystems mounted, halt the package and activate the VG's and mount the filesystems outside of SG control while you do your maintenance. You can also use "cmmodnet" command to add/remove the Oracle network address outside of package control if needed. Just make sure before you restart the SG package that you undo any manual changes you have done. The vgchange and cmmodnet man pages (as well as a knowledgeable HP-UX admin) are your friend here.

The manuals start here. But you are going to need to be careful and make sure you are looking at features that apply to legacy packages and older versions. 

http://h20180.www2.hpe.com/apps/Nav?h_pagetype=s-003&h_product=3197900&h_page=hpcom

I work for HPE.