Updating a database option in DB2


Sometimes after a database has been created, you may want to move where the default log path is. Or you may want to change  DB2 places the log path in the home directory, and you may want to have the logs stored on another storage device.

Login as the DB2 adminstrative user, then type the following command to change your log path:

> db2 UPDATE DB CFG FOR MyDB USING <OptionName – ex., NEWLOGPATH> <Value – ex., /db2data/AnyDirectory/NODE0000/logdir>

Stop and restart DB2 (db2stop force and db2start). Your new log path is now active.