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.