- 论坛徽章:
- 0
|
Belows are the steps to create an event monitor:
1. Go to your RUN and enter db2cmd
2. Connect to your database in the command prompt
* db2 "connect to <DB NAME>"
3. Create an event monitor, you may put any name for the <EVENT NAME>
* db2 "create event monitor <EVENT NAME> for statements write to table"
4. Turn on the monitor
* db2 "set event monitor <EVENT NAME> state=1"
5. Run any of your program or application which you want to monitor on the SQL.
6. Turn off the monitor
* db2 "set event monitor <EVENT NAME> state=0"
7. View the executed SQL statement
* db2 "select stmt_text from <SCHEMA NAME>.STMT_<EVENT NAME> order by sql_req_id"
8. Terminate the connection
* db2 "terminate"
This is how I did for the event monitor but I'm able to get the static and dynamic SQL but for dynamic SQL not able to get the value.
your function is right.i will have a test.if i have result,i will tell you,my msn : white_liu@hotmail.com |
|