In order for AQT to display the Snapshot Monitor information, the Monitor flags need to be switched on. There are two ways in which this can be done:
A summary of the flags, and how they are switched on, is as follows:
Monitor Element |
Switch on Permanently |
Switch on Temporarily |
UOW |
update dbm cfg using dft_mon_uow on |
update monitor switches using uow on |
Statement |
update dbm cfg using dft_mon_stmt on |
update monitor switches using statement on |
Timestamp |
update dbm cfg using dft_mon_timestamp on |
update monitor switches using timestamp on |
Lock |
update dbm cfg using dft_mon_lock on |
update monitor switches using lock on |
Bufferpool |
update dbm cfg using dft_mon_bufpool on |
update monitor switches using bufferpool on |
Table |
update dbm cfg using dft_mon_table on |
update monitor switches using table on |
Sort |
update dbm cfg using dft_mon_sort on |
update monitor switches using sort on |
These commands are run through the DB2 Command Window. Any changes to the dbm cfg only come into effect when the database manager instance is next started, and this will apply to all databases within that instance.
When the flags are switched on temporarily, they are only in effect for the duration of the task that issued the commands. So if you switch them on using a DB2 Command Window, they will be switched off when you close the Command window.
Within the System Monitor, you can go View > DB2 Monitor Switches. This will take you to a window which shows you the current state of the switches. You can change them then click on Update.
DB2 doesn't provide an easy mechanism for programs (such as AQT) to change the monitor switches. While there is an API call, this is difficult to use. Instead, AQT changes the monitor switches by opening a DB2 Command Window and issuing the appropriate update monitor switches command.
It is hoped that in future releases of DB2, a better mechanism for switching on the monitor flags will be provided.
During testing of the System Monitor, it was found that the monitor information was sometimes not displayed when the switches were set on using the update monitor switches command. It is not known why this is the case. The monitor information displayed much more reliably when the monitor switches were set on in the dbm cfg.