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 > Monitor Regular Sql

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-17-07, 18:36
udbraja udbraja is offline
Registered User
 
Join Date: Sep 2004
Posts: 111
Arrow Monitor Regular Sql

Team,

We have about to monitor daily running sql's (SAME 60 sql's) -AUTOMATED
And store the Starting time, End time, Rows read, Timerons in a table.

What approach is the best one?
Is there any third party utility solve this idea.
Unix shell scripting will solve this?

Any idea is appreciated.

Thanks,
R
Reply With Quote
  #2 (permalink)  
Old 01-18-07, 04:30
rahul_s80 rahul_s80 is offline
Registered User
 
Join Date: Jul 2006
Location: Pune , India
Posts: 433
you can start a statement event monitor and write the output to table

CREATE EVENT MONITOR abc FOR STATEMENTS WRITE TO TABLE BUFFERSIZE 4 BLOCKED MANUALSTART ;

this will cause stmt_abc table which will have all the details for the period for which event monitor is on

--Rahul Singh
Reply With Quote
  #3 (permalink)  
Old 01-25-07, 20:01
udbraja udbraja is offline
Registered User
 
Join Date: Sep 2004
Posts: 111
Arrow

BY this approach I am not getting

END EXECUTION TIME.

Sql statement is LOB and fills up the table quickly.

Is there any way I tell event monitor to monitor only few queries?

thanks,
-R
Reply With Quote
  #4 (permalink)  
Old 01-30-07, 10:29
udbraja udbraja is offline
Registered User
 
Join Date: Sep 2004
Posts: 111
Arrow

Team..

Any takers...

Any guidelines appreciated.

Thanks,
R
Reply With Quote
  #5 (permalink)  
Old 01-31-07, 10:10
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
You may 'filter' the event monitor capture by specifying authid, applname etc.
Have a look at the create event monitor stmt ..

I would recommend capturing the information to a file and using awk or perl to parse them ... Write to table is a big overhead (beware - the overhead will not be captured by snapshot or event monitors - except the TABLE ones) especially for a OLTP system

HTH
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #6 (permalink)  
Old 01-31-07, 10:25
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
IIRC, last year there was an article in developerworks by someone in IBM canada who provided scripts for analysis ... Can't seem to find it now ..

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
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