Append only DB2 diagnostic log and administration notification log files? No more in DB2 9.7!

How many times have I asked customers for the DB2 diagnostic log file (db2diag.log) only to be told “it’s too large to send” or “it’s taking too long to open.” This is because the DB2 diagnostic files have been append only since time immemorial, their growth only restricted by the maximum space available in the file system they reside in. The only way to curb this growth would be to rename the files which would then force the creation of new ones. Scripts had to be written to automate this process and to delete old files after a certain period.

With the advent of DB2 9.7, all this is now history! The new diagsize database manager parameter allows a DBA to control the maximum sizes of the DB2 diagnostic log and administration notification log files. When this parameter is set to a non-zero value (which is the default pre-DB2 9.7 behavior), a series 10 rotating diagnostic log files and a series of rotating administration notification log files (only on UNIX and Linux) are used. It is also smart enough to clean up the diagnostic log directory of old log files. When the size of 10th file is full, the oldest file is deleted, and a new file is created. More information is available at: http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.admin.config.doc/doc/r0054862.html?resultof=%22%64%62%32%64%69%61%67%22%20.

Things to note:

·         diagsize is not configurable online. It needs an instance restart after an update for the new value to take effect.

·         diagsize is the value (in MB) of the total size of all the DB2 diagnostic log and administration notification log files on UNIX and Linux. 90% of the total size is allocated for the 10 diagnostic log files and 10% of the total size is allocated for the 10 administration notification log files. On Windows, diagsize is the value (in MB) of the total size of all the 10 DB2 diagnostic log files on Windows. The link above gives a good example to clarify this.

Share
This entry was posted in Techie Tips and tagged , , , . Bookmark the permalink.