1、查看Monitor状态:
C:\Users\Administrator>db2 get monitor switches
监视器记录开关
数据库分区号 0 的开关列表
缓冲池活动信息 (BUFFERPOOL) = ON 2013-01-20 20:18:52.239353
锁定信息 (LOCK) = ON 2013-01-20 20:18:52.239353
排序信息 (SORT) = ON 2013-01-20 20:18:52.239353
SQL 语句信息 (STATEMENT) = ON 2013-01-20 20:18:52.239353
表活动信息 (TABLE) = ON 2013-01-20 20:18:52.239353
获取时间戳记信息(时间戳记) = ON 2013-01-20 20:03:26.128052
工作单元信息 (UOW) = ON 2013-01-20 20:18:52.239353
2、修改Monitor状态:
C:\Users\Administrator>db2 update monitor switches using bufferpool on lock on sort on statement on table on uow on
语法:
UPDATE MONITOR SWITCHES USING {switch-name {ON | OFF} ...}
[AT DBPARTITIONNUM db-partition-number | GLOBAL]
switch-name:
BUFFERPOOL、LOCK、SORT、STATEMENT、TABLE、TIMESTAMP 和 UOW
3、查看快照信息:
C:\Users\Administrator>db2 get snapshot for all applications > f:\app.out
语法:
GET SNAPSHOT FOR {DATABASE MANAGER | ALL [DCS] DATABASES |
ALL [DCS] APPLICATIONS | ALL BUFFERPOOLS | [DCS] APPLICATION
{APPLID appl-id | AGENTID appl-handle} | FCM FOR ALL DBPARTITIONNUMS |
LOCKS FOR APPLICATION {APPLID appl-id | AGENTID appl-handle} |
{ALL | [DCS] DATABASE | [DCS] APPLICATIONS | TABLES |
TABLESPACES | LOCKS | BUFFERPOOLS | DYNAMIC SQL [write to file]}
ON database-alias} [AT DBPARTITIONNUM db-partition-number | GLOBAL]