Thursday, January 14, 2010

Separating diagnostic logs in DB2 9.7 (to split or not to split)

One of the new or enhanced features in the DB2 9.7 FP1 is the option to store the diagnostic logs in separate files for a physical host, a database partition, or both (DPF environments). The idea is that by separating the diagnostic logs the possible contention is reduced and hence the diagnostic logging performance increases. In addition, the storage administration might become simpler.

To do so you have to change the database manager (dbm) configuration and use the "$h" (host) and/or "$n" (database partition number/node) variables inside the diagpath (diagnostic data directory path) setting. An example to set the diagpath to "home/mydb2/db2dump" and split according to the physical host would be:

db2 update dbm cfg using diagpath '"/home/mydb2/db2dump/ $h"'

BTW: You can later merge the diagnostic log files using the db2diag tool.