MAINTAINING THE DOMINO AND DB2 ENVIRONMENT
IBM® DB2 Universal Database™ Enterprise Server Edition contains several default monitoring switches. Each of the monitoring switches gathers data for a specific configuration parameter. DB2 contains these default monitoring switches:
By default, the timestamp parameter is on, but it is best to explicitly set timestamp to on because it is possible to turn timestamp off. This is the timestamp of the log being processed.
You can take a snapshot of the data that is gathered during the monitoring session for any configuration parameter whose switch is set to On. To generate a snapshot for diagnostic purposes, the DB2 monitors must be turned on.
To obtain a database monitor snapshot, enter this command from the CLP:
When you generate an SQL snapshot, the snapshot output displays on the computer monitor. It is not saved to a log file. To save the snapshot to a file so that you can review the information at a later time, use this command:
db2 update monitor switches using sort on
lock on
table on
bufferpool on
uow on
statement on
timestamp on
Note The commands are also explained below.
>db2mon.out
db2 get snapshot for all on YourDatabase
>>db2mon.out
db2 list applications show detail
The symbol > (single greater than) writes the output of the command to a file. Text in the file is overwritten. The symbol >> (double greater than) appends the output of the command to a file. It does not overwrite existing text, it just appends new text to the end of the file.
This sequence of commands produces the following results:
Puts the dbm snapshot in the file db2mon.out and overwrites anything that was in that file.
db2 get snapshot for all on YourDatabase >>db2mon.out
Adds the database snapshot to db2mon.out
db2 list applications show detail >>db2mon.out
Adds information about applications to db2mon.out
The following is a sample of the output generated for one statement:
Using a snapshot to detect negative locking behavior
Use the data that is gathered in the snapshot to detect negative locking behavior. To do so, locate the section titled "Database Lock Snapshot." A lock entry in your snapshot will look similar to this example:
If DB2 monitor snapshots show numerous row locks escalated to table locks, consider increasing the size of the locklist parameter.
Related topics