大橙子网站建设,新征程启航

为企业提供网站建设、域名注册、服务器等服务

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使用与查询
转载注明:http://dzwzjz.com/article/ihcpep.html
在线咨询
服务热线
服务热线:028-86922220
TOP