Db2 monitor that monitors database execution statements

Source: Internet
Author: User
Tags db2 connect db2 connect to

Db2 monitor, monitor database execution statement 1) view monitor options db2 get monitor switches; 2) Modify statement tracking options www.2cto.com db2 update monitor switches using statement on; 3) create statement monitor windows: db2 connect to dbname user db2admin using db2admin; db2 create event monitor state_event for statements write to file 'C: \ state_event \ '; linux: db2 connect to dbname user db2inst4 using db2inst4; db2 create event monitor state_event for statements write to file '/home/db2inst4/state_event/'; 4) activate the monitor mkdir c: \ state_event db2 set event monitor state_event state = 1; www.2cto.com 5) run the application such as query: select * from table_name; 6) Output db2 flush event monitor state_event buffer; 7) disable the monitor db2 set event monitor state_event state = 0; db2 update monitor switches using statement off; drop event monitor state_event; 8) format the result db2evmon-path c: \ state_event> c: \ SQL .txt; db2evmon-path/home/db2inst4/state_event>/home/db2inst4/SQL .txt; 9) Delete the monitor db2 drop event monitor state_event;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.