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 > new snapshot functions of version 8

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-02-04, 16:46
jdara1 jdara1 is offline
Registered User
 
Join Date: Dec 2002
Location: cincinnati
Posts: 18
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
Reply With Quote
  #2 (permalink)  
Old 02-03-04, 01:37
nitingm nitingm is offline
Registered User
 
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
File Type: zip snap.zip (875 Bytes, 24 views)
__________________
HTH

Nitin

Ask the experienced rather than the learned
Reply With Quote
  #3 (permalink)  
Old 02-03-04, 16:15
jdara1 jdara1 is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 02-03-04, 16:40
dollar489 dollar489 is offline
Registered User
 
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

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