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 > Snapshots and history

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-29-08, 14:19
db2rocks db2rocks is offline
Registered User
 
Join Date: Jan 2008
Posts: 45
Snapshots and history

Hi friends,

Could some one here tell me why db2 does not grab history for applications where as it has history for dynamic sql snapshot

db2 "select UOW_START_TIME,UOW_STOP_TIME from table(SNAPSHOT_APPL('MARKETDB',-1)) as SNAPPL"


When i use the above statement,it just gives the information about the current running applications..Both my instance level and CLP level monitor switches are on..Shouldnt it give the earlier ones like yesterday`s or day before..If not why does the snapshot_dyn_sql give the history and not SNAPSHOT_APPL??


Thanks
Reply With Quote
  #2 (permalink)  
Old 02-29-08, 16:33
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
By definition, snapshot is a momentary copy of the system state. Dynamic SQL snapshot obtains information from the statement cache, where statement plans and the corresponding statistics can remain for some time, until it is replaced by more recent statements. In other words, it is not a "history" of dynamic SQL, it's a momentary state of the dynamic statement cache.
Reply With Quote
  #3 (permalink)  
Old 02-29-08, 17:05
db2rocks db2rocks is offline
Registered User
 
Join Date: Jan 2008
Posts: 45
What about the number of rows read in SNAPSHOT_TABLE function..Does that have a historical counter??

So, with out using event monitors there is no way we can capture historical info in DB2?
Reply With Quote
  #4 (permalink)  
Old 02-29-08, 17:24
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by db2rocks
What about the number of rows read in SNAPSHOT_TABLE function..Does that have a historical counter??
I would call that "cumulative", not "historical". Normally you cannot rely on the absolute value of those counters, because you have no idea when they were reset; you look at the change in the counter value between two consecutive snapshots.

If you want to keep history for a known interval you would need to schedule regular snapshots during that interval. That is what the snapshot function are for.
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