On RHEL 7u9, DB2 11.1, fresh install. When I run db2greg -updtinstrec instancename='db2inst1!StartAtBoot=0'
and then db2iauto -on db2inst1
, how exactly is DB2 started (db2start
) on system boot? The documentation for 11.5 and 11.1 does not describe the underlying OS mechanism used.
I run systemctl --all --no-pager | grep -i -e db2 -e ibm
but it returns no SystemD units having anything to do with DB2 as far as I can tell. There is nothing I see in /etc/inittab (deprecated anyways) or /etc/rc.d/init.d for DB2. So I'm stumped on how DB2 is supposed to start when the autostart feature is enabled.
For systemd
the current builds of Db2 deliver a skeleton unit file in /etc/systemd/system/db2fmcd.service
.
Beware current new installations/updates can overwrite this file so you need to manage the file versions yourself if you modify this file.
You will need to customize this file if you need special processing for shutdowns or suspend/resume, or if you have specific initialization/teardown dependencies that don't have their own unit files and targets.
For a non-purescale instance, non-DPF, the unit file will run db2fmcd
. That will stay running and acts as a watchdog. It will arrange to detect local autostart instances and arrange for their db2start
to get invoked. I interact with it via systemctl stop db2fmcd
and systemctl start db2fmcd
. One copy of db2fmcd
manages all running instances, regardless of their version, which appears to work OK.
The Db2-LUW Knowledge Centre only indirectly describes these things, for example at the db2fmcu page, and it lacks transparency regarding systemd exploitation, and lacks details of product-specific differences in this area.