DB2 snapshot monitoring may be unfamiliar to many new users who are new to DB2 databases. The following describes the items of DB2 snapshot monitoring for your reference.
DB2 snapshot monitoring items:
Sorts: Number of heaps used, overflows, sorts performance, SORT] DFT_MON_SORT]
Locks: Number of locks held, number of deadlocks, LOCK] DFT_MON_LOCK]
Tables: Measure activity (rows read, rows written), TABLE] DFT_MON_TABLE]
Bufferpools: Number of reads and writes, time taken, BUFFERPOOL] DFT_MON_BUFPOOL]
Unit of work: Start times, end times, completion status, UOW] DFT_MON_UOW]
SQL statements: Start time, stop time, statement identification, STATEMENT] DFT_MON_STMT]
Timestamps: Monitors timestamp, TIMESTAMP] DFT_MON_TIMESTAMP]
You can use the following two commands to enable monitoring:
Update dbm configuration using DFT_MON_STMT ON
You do not need to restart the instance to modify this parameter. This parameter applies to each database in the instance. In addition to these monitoring parameters, other modifications to the instance parameters must take effect on the instance ).
UPDATE MONITOR SWITCHES USING STATEMENT ON
This command enables this option to only play a role in this session. If it is disconnected, it becomes invalid.
Obtain the availability level of the metric snapshot:
Database manager-Captures information for an active instance
Database-Captures database (s) information
Application-Captures application (s) information
Bufferpools-Captures buffer pool activity information
Table space-Captures information for table spaces within a database
Table-Captures information for tables within a database
Lock-Captures information for locks held by applications against a database
Dynamic SQL cache-Captures point-in-time statement information from the SQL statement cache for the database
View monitoring switch:
Get monitor switches -- view the monitoring settings of the current session
How to Implement online DB2 Import
Common db2 stored procedure statements
Usage of the DB2 create server statement
Usage of DB2 Merge statements
Overview of DB2 Flow Control clauses