DB2 autostart with systemd
Jump to navigation
Jump to search
DB2 autostart with systemd
Problem
DB2 installation creates an inittab entry which controls autostart of db2 instances
fmc:2345:respawn:/opt/ibm/db2/V10.5/bin/db2fmcd #DB2 Fault Monitor Coordinator
With systemd managing the os startup instead of sysvinit, the inittab is no longer used. This means DB2 instance autostarts and automatic restarts after failures no longer work.
Solution
Create a systemd service file /etc/systemd/system/db2fmcd.service that does the same job as the above inittab entry
[Unit] Description=DB2 Fault Monitor Coordinator [Service] ExecStart=/opt/ibm/db2/V10.5/bin/db2fmcd Restart=restart-always [Install] WantedBy=multi-user.target
Make systemd aware of the new file
# systemctl daemon-reload
Start the service once
# systemctl start db2fmcd.service
Enable autostart of the service at boot
# systemctl enable db2fmcd.service