 |
Support & downloads > |
 |
 |
 |
How to use fault monitors to automatically restart DB2 UDB instances
|
| | | 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 | - Log in as Root
- 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 - 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. - 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.
- 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 - Start up the fault monitor daemon:
./db2fm -i instance_name -U - Start up the fault monitor service:
./db2fm -i instance_name-u - Turn on the fault monitor for the instance:
./db2fm -i instance_name -f on - 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 - Reboot the server. The fault monitor service should be available once the server has been rebooted.
- 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 - Log in as Root.
- Go to the DB2DIR/bin directory (per step 4).
- Verify the FMC Daemon state using the command:
db2fmcu
FMC: up: PID = 3415 - 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 - The instance will be automatically restarted.
| | | | | | | | | |
 |
| 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. |
 |
 |
 |
| Please take a moment to complete this form to help us better serve you. |
 |
 |
 |
|
|
|
 |
 |
| 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 |
 |
|