DB2 Instance autostart does not work on SLES 12 / RHEL 7

Hi all,

I had to fight with a customer environment on SLES 12 where the db2 instances did not start automatically when starting the operation system.

db2iauto -on db2inst1

was executed but the instance did not come up! The problem is related to the DB2 fault monitor that is not started automatically on system start.
The fault monitor permanently monitors the instance and automatically restarts it after a crash. Furthermore, the fault monitor can auto restart an instance on machine reboot. If you issue „db2stop“ then the fault monitor will NOT start the instance automatically again – but this is the only exception.
In total a good mechanism – but useless when using TSAMP / HACMP Cluster Software because in this case the restart of an instance is controlled by this kind of software.

On pre SLES 12 / RHEL 7 systems the fault monitor is started using inittab:

Bildschirmfoto 2016-07-12 um 08.27.51

The entry was available on this system…
But on SLES 12 / RHEL 7 systemd replaces the default init system. This entry in inittab is not executed anymore.

You need to configure a service for the fault monitor be to started when the operating system starts – IBM already created a technote for this:

1) create a service file in the folder


2) input the following content:




This tells the systemd daemon to start the db2 fault monitor on system start. Furthermore „Restart=always“ tells the daemon to restart the service if it terminates abnormally.

3) execute the following command to refresh the configuration

systemctl daemon-reload

4) execute the following command to enable the service

systemctl enable db2fmcd

5) execute the following command to start the service

systemctl start db2fmcd

Now you need to login as your instance owner and set the instance to automatically start upon operating system start

db2iauto -on db2inst1

Check the setting using

Bildschirmfoto 2016-07-12 um 08.30.33
Restart the operating system to check if your change was successful.

If you want to start your application / HTTP servers automatically on operating system start you should also use systemd – once you understood the concept behind it is a powerful and better init system than the old one from the previous SLES / RHEL versions.

Leave a Reply

Your email address will not be published. Required fields are marked *