DB2EventMonitor使用与查询

环境: db2v9.7,  RedHat 5

首先创建一个目录用于存放事件监控,例:
[db2inst1@esi-202 ~]$ mkdir emondir

创建一个sql语句的事件监控
[db2inst1@esi-202 ~]$ db2 "create event monitor emon1 for statements write to file '/home/db2inst1/emondir'"

启动emon1
[db2inst1@esi-202 ~]$ db2 "set event monitor emon1 state 1"

查看事件监控生成的内容:
[db2inst1@esi-202 ~]$db2evmon -path emondir

查看事件监控启动情况:
[db2inst1@esi-202 ~]$db2 "select evmonname, event_mon_state(evmonname) from syscat.eventmonitors

关闭emon1
[db2inst1@esi-202 ~]$ db2 "set event monitor emon1 state 1"

删除emon1
[db2inst1@esi-202 ~]$ db2 "drop event monitor emon1'"

当前名称:DB2EventMonitor使用与查询
网页URL:http://lszwz.com/article/ihcpep.html

其他资讯

售后响应及时

7×24小时客服热线

数据备份

更安全、更高效、更稳定

价格公道精准

项目经理精准报价不弄虚作假

合作无风险

重合同讲信誉,无效全额退款