Use the event monitor to monitor SQL statements/*********************** in DB2 to track SQL www.2cto.com ***** * ******************/1. create event monitor 1) view monitor options db2 get monitor switches2) Modify statement tracking options db2 update monitor switches using statement on3) create statement monitor db2 create event monitor state_event for statements write to file 'e: \ test \ '4) activate monitor db2 set event monitor state_event state = 15) run application eg: select * from staff6) finish outputting db2 flush event monitor state_event buffer 7) Close Monitor db2 set event monitor state_event state = 08) the formatting result db2evmon-path e: \ test> e: \ SQL .txtcan now view the trace result in the latest SQL .txt file. The same applies to other monitoring options. In SQL .txt, you can see the Application Id (Appl Id), statement content, and Bufferpool usage of each SQL statement. In addition, the execution time of each phase of the statement Prepare, Open, Describe, and Close is recorded. Note: The first eight digits in the Application ID are the IP address of the client machine.