Skip to main content

Support & downloads  >  

How to use fault monitors to automatically restart DB2 UDB instances

 Technote (FAQ)
 
Question
How can I automatically restart my DB2 UDB instances? This document lists step by step instructions for setting up the Fault Monitor Facility to automatically restart DB2 UDB instances.
 
Cause
The db2iauto command enables and disables the auto-start of an instance after each system restart. With Fault Monitor facility, if the DB2® Universal Database™ (DB2 UDB) instance exits prematurely, the fault monitor will restart it.
 
Answer
  1. Log in as Root

  2. Determine whether there are any db2fmcd entries in the /etc/inittab file:
    cat /etc/inittab | grep db2fmcd
    If there are, remove them or comment them out before proceeding. To remove the entry, use the command: db2fmcu -d

  3. Make sure there are no db2fmcd (Fault Monitor Coordinator Daemon (FMCD)), db2fmd (Fault Monitor Daemon) or db2fm (Fault Monitor) processes running:
    ps -ef | grep db2fm
    If there are, remove (kill) the process before proceeding.

  4. Go to the DB2DIR/bin directory, where DB2DIR represents /usr/opt/db2_08_01 on AIX®, and /opt/IBM/db2/V8.1 on Solaris, HP-UX and Linux®. If you are using Solaris, the path may be slightly different, since you can override the default installation path at the time of installation.

  5. Enable the Fault Monitor Coordinator:
    ./db2fmcu -u -p /opt/IBM/db2/V8.1/bin/db2fmcd
    This step adds an entry to the /etc/inittab so that the FMCD process will be started each time you reboot. The entry will be similar to the following:
    fmc:2345:respawn:/opt/IBM/db2/V8.1/bin/db2fmcd #DB2 Fault Monitor Coordinator

  6. Start up the fault monitor daemon:
    ./db2fm -i instance_name -U

  7. Start up the fault monitor service:
    ./db2fm -i instance_name-u

  8. Turn on the fault monitor for the instance:
    ./db2fm -i instance_name -f on

  9. Verify the fault monitor state. Log in as the instance owner, then perform the command:
    db2fm -s -S
    You should see output similar to the following:
    Gcf module 'fault monitor' is NOT operable
    Gcf module '/home/instance_name/sqllib/lib/libdb2gcf.so' state is AVAILABLE

  10. Reboot the server. The fault monitor service should be available once the server has been rebooted.

  11. Verify the fault monitor state. Login as the instance owner, then perform the command:
    db2fm -s -S
    You should see output similar to the following:
    Gcf module 'fault monitor' state is AVAILABLE
    Gcf module '/home/test/sqllib/lib/libdb2gcf.so' state is AVAILABLE

  12. Log in as Root.

  13. Go to the DB2DIR/bin directory (per step 4).

  14. Verify the FMC Daemon state using the command:
    db2fmcu
    FMC: up: PID = 3415

  15. At this point, if the instance is shut down in any way other than via the db2stop command, the fault monitor will start it up again. If you want to test the fault monitor's functionality, bring down the DB2 UDB instance. For example, issue the command:
    db2_kill

  16. The instance will be automatically restarted.
 
Related information
Fault monitor facility for UNIX-based systems
IY73822: ADD DB2FMCU COMMAND TO DOCUMENTATION
 
 
 

Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.
Rate this page
Please take a moment to complete this form to help us better serve you.
This material provides me with the information I need.




This material is clear and easy to understand.




Did the information help you to achieve your goal?
What updates, improvements, or related information would you like to see in this document?
Your response will be used to improve our document content. Requests for assistance, if applicable, should be submitted through your normal support channel as we cannot respond from this site.
Input the verification number to submit feedback:
Document information
 Product categories:
 Software
 Data Management
 Data Servers (Database Management Systems)
 DB2 for Linux, UNIX and Windows
 High Availability - Fault Monitor
 Operating system(s):
  AIX, HP-UX, Linux, Solaris
 Software version:
  8
 Reference #:
  1209001
 IBM Group:
 Software Group
 Modified date:
 2005-06-13

Translate My Page
 
 

Rate this page

Help us improve this page. Your response will be used to improve our document content. Requests for assistance, if applicable, should be submitted through your normal support channel as we cannot respond from this site.