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 > DB2 query logs??

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-12-06, 02:54
ADee ADee is offline
Registered User
 
Join Date: Jan 2004
Location: Karachi,pakistan
Posts: 17
Question DB2 query logs??

Hi all,

here is one very urgent query...the problem is that I would like to know is there any way to find out that so far what queries has been run on my DB2 database tables.I am not asking for the specific queries run from DB2 Command Center but from whatever-end...might be an application that run the queries or what so ever.

Can anyone pls help how to get these logs??...

I am on Win2003 and IBM DB2 UDB v8.1

lots and lots of thanks in Advance
-Aay Dee
__________________
A.Dee
Reply With Quote
  #2 (permalink)  
Old 05-12-06, 05:49
ggnanaraj ggnanaraj is offline
Registered User
 
Join Date: Aug 2002
Location: Chennai, India
Posts: 171
You can do a snapshot on your database using the following command to collect the SQL fired against the database irrespective of the application...

db2 get snapshot for dynamic sql on dbname

Redirect the above to a file.

HTH.
Reply With Quote
  #3 (permalink)  
Old 05-14-06, 23:15
Daniel-D Daniel-D is offline
Registered User
 
Join Date: Apr 2006
Posts: 8
also, you can using this SQL to query the sqls which is running on your db.
SQL:
SELECT * FROM TABLE( SNAPSHOT_DYN_SQL( 'SAMPLE', -1 )) as SNAPSHOT_DYN_SQL

you code your db name instead of 'SAMPLE',BTW you must have dbm authority.

Last edited by Daniel-D; 05-15-06 at 04:59.
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