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 > SQL query timestamp

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-15-06, 14:56
koganti koganti is offline
Registered User
 
Join Date: Jul 2002
Location: ATL
Posts: 170
SQL query timestamp

How to find the starting timestamp and end timestamp of a sql that executed on the database. I tried snapshot on dynamic sql. It does not provide when the query started
Reply With Quote
  #2 (permalink)  
Old 12-15-06, 15:49
jayecarter jayecarter is offline
Registered User
 
Join Date: Aug 2002
Location: St. Louis
Posts: 16
You can use an event monitor for statements and capture detail about the execution of a statement including elapsed time, operation start and end times etc.
Reply With Quote
  #3 (permalink)  
Old 12-15-06, 15:52
koganti koganti is offline
Registered User
 
Join Date: Jul 2002
Location: ATL
Posts: 170
I cannot use event monitors. Does any of the snapshots provide this information ?
Reply With Quote
  #4 (permalink)  
Old 12-15-06, 16:09
jayecarter jayecarter is offline
Registered User
 
Join Date: Aug 2002
Location: St. Louis
Posts: 16
Using a command line window I can do a get snapshot for application agentid n - I get to see the start and end times of previous unit of work and operation. What uow or op that was is questionable. I find the snapshot to be most valuable when looking at cumulative counters - rows read by an app since connect etc. Capturing current operation is difficult and probably error prone. I'm working in V7.2 still so there may be improved facilities in 8/9.

I know an event monitor gives that information - really useful info. You didn't say why you can't use an event monitor but I would feel naked without that functionality.
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