If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > How to get SQLs for static SQL using event monitor?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-23-08, 06:45
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
How to get SQLs for static SQL using event monitor?

Hi,
using DB2 ESE v8.2 fp11 on Linux I have created event monitor for statements with the following two commands:
Code:
CREATE EVENT MONITOR event_mon_SQL FOR STATEMENTS WRITE TO TABLE MANUALSTART
SET EVENT MONITOR event_mon_SQL STATE=1
I see EVENT_MONITOR_SQL table has been created and there are SQLs that was executed on database. When using dynamic SQL there is SQL statement in column STMT_TEXT displaying the actual executed statement. So far so good. But when using static SQL (CICS application using static SQL) there is no info in STMT_TEXT. I can see package name in PACKAGE_NAME column and I can also get statements from SYSCAT.STATEMENTS table. But there are 10 or more SQL statements by package. But in table EVENT_MONITOR_SQL there is only one record by package not by statement. Is there any way to get info about how long was execution time for a particular statement inside package?

Regards,
Grofaty
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On