Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2002
    Location
    cincinnati
    Posts
    18

    Unanswered: new snapshot functions of version 8

    As I understand, db2 udb version 8 has got new snapshot functions, I think to collect snapshot on locks, applications etc.,

    It will be useful for us, if somebody is able to provide some examples by using those functions. May be somebody might have discussed about this, you may provide the link to that discussion. So that I will go through that.


    I am interested in db2 udb 8 running on Unix, since most of our installations on AIX.

    Earlier in version 7, we have one script ( called dyn.ksh ) which one of the IBM performance tuning person gave us, it goes and creates a table in the database, parses the output of dynamic sql snapshot then provides the report in the flat file (with , delimiter) giving detail like which sql is taking more cpu times etc., now I am thinking that, in version 8, they have builtin sometables itself.

    Thanks
    Jagadish
    jagadish dara

  2. #2
    Join Date
    Jul 2003
    Location
    Austin, TX, USA
    Posts
    278

    Implementation.

    Hi,

    I am attaching 3 files which is an example of how you enable, get snapshots and disable snapshots. The files pass the output to textfiles.

    This is under windows, however the command remain the same and you can modify the file paths to suit your need.

    Hope this helps.

    Nitin.
    Attached Files Attached Files
    HTH

    Nitin

    Ask the experienced rather than the learned

  3. #3
    Join Date
    Dec 2002
    Location
    cincinnati
    Posts
    18

    Re: Implementation.

    I saw the files you sent, they are just db2 udb commands something like this,

    DB2 GET SNAPSHOT FOR ALL bufferpools > c:\temp\buf.txt
    DB2 GET SNAPSHOT FOR locks ON sample > c:\temp\locks_sample.txt
    DB2 GET SNAPSHOT FOR dynamic sql on sample > c:\temp\dynsql_sample.txt
    DB2 GET SNAPSHOT FOR tables on sample > c:\temp\tbl_sample.txt
    DB2 GET SNAPSHOT FOR tablespaces on sample > c:\temp\tbs_sample.txt


    I think, I did not specify my requriement clearly. Just now I have system monitor guide of V8, I saw some snapshot functions how to use them.
    I am just pasting the sample sql whatever I just started using.
    $ cat snap.sql
    --select * from table(snapshot_dbm(-1)) as snapshot_dbm;
    select * from table(snapshot_database('kpadb',-1)) as snapshot_database;
    The above are from system monitor guide only, if somebody has gone through them, it may be nice if you are able to explain me in detial.

    Thanks
    Jagadish
    jagadish dara

  4. #4
    Join Date
    Sep 2002
    Posts
    456

    Re: Implementation.

    well, most of the snapshot function, shows data in tabular format rather than txt format. Also, most of the function has this format:

    function_name(parm1,parm2)

    where parm1 is usually database name
    and parm2 is database partition number (for EEE), but you can leave it as null i.e. only specify database name and second parameter will default to current partition.

    dollar

    Originally posted by jdara1
    I saw the files you sent, they are just db2 udb commands something like this,

    DB2 GET SNAPSHOT FOR ALL bufferpools > c:\temp\buf.txt
    DB2 GET SNAPSHOT FOR locks ON sample > c:\temp\locks_sample.txt
    DB2 GET SNAPSHOT FOR dynamic sql on sample > c:\temp\dynsql_sample.txt
    DB2 GET SNAPSHOT FOR tables on sample > c:\temp\tbl_sample.txt
    DB2 GET SNAPSHOT FOR tablespaces on sample > c:\temp\tbs_sample.txt


    I think, I did not specify my requriement clearly. Just now I have system monitor guide of V8, I saw some snapshot functions how to use them.
    I am just pasting the sample sql whatever I just started using.
    $ cat snap.sql
    --select * from table(snapshot_dbm(-1)) as snapshot_dbm;
    select * from table(snapshot_database('kpadb',-1)) as snapshot_database;
    The above are from system monitor guide only, if somebody has gone through them, it may be nice if you are able to explain me in detial.

    Thanks
    Jagadish

Posting Permissions

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