Tracking DB2 SQL statements

Source: Internet
Author: User
Tags db2 sql statements

The following information was found:

1. Use commands to open a trail
DB2 update monitor switches using Statement on;
2. Obtain the snapshot of an SQL statement
DB2 get snapshot for dynamic SQL on AAA> SQL .txt
-- AAA: name of the database to be tracked
3. Use FTP to download and open SQL .txt locally
4. Disable tracking
DB2 update monitor switches using statement off;

Modify the suggestions of db_zhang.
DB2 update monitor switches using bufferpool/lock/sort/
Statement/table/timestamp/uow on is process-based
In addition, you can change the DBM parameter (which affects performance), dft_mon_bufpool, dft_mon_lock, dft_mon_sort, dft_mon_stmt, dft_mon_table, dft_mon_uow, dft_mon_timestamp

Then get snapshot for dynamic SQL on DB Name> xx
Then you can read it in the XX file.

There are some third-party tools available for you to see, such as quest central for db2. find them online.

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.