30 January,2010 by Tom Collins
DB2 trace sql - how can I set up a trace to capture all sql statements?
Use this process to record all sql statements for a give period of time on DB2.
In other words , a DB2 trace
#connect to db #1-Create event monitor- make sure you've got write permissions to stated folder db2 "CREATE EVENT MONITOR stmon FOR STATEMENTS WRITE TO FILE '/tmp'" #2 Turn on event monitor db2 SET EVENT MONITOR stmon STATE = 1 #3. (Do stuff to the database that you want to monitor) #4. Turn off event monitor db2 SET EVENT MONITOR stmon STATE 0 #5. Translate event monitor into readable stuff db2evmon -path /tmp > /tmp/filtered.out #6. Read the events vi /tmp/filtered.out #7. Delete event monitor db2 DROP EVENT MONITOR stmon
DB2 Query Tuning – db2expln - DBA DB2
Database Tuning as a process and automation - DBA DB2
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |