Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2008
    Posts
    45

    Unanswered: 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

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    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.
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    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?

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    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.
    ---
    "It does not work" is not a valid problem statement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •