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 > Dumping incoming SQL to a file?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-13-04, 12:31
aakashk aakashk is offline
Registered User
 
Join Date: Dec 2004
Posts: 1
Dumping incoming SQL to a file?

Does DB2 have a way to dump all incoming SQL statements on all connections to a file, or a console? I would like to see what SQL statements are being submitted by users.

Thanks,
-Aakash
Reply With Quote
  #2 (permalink)  
Old 12-13-04, 12:52
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Event Monitor is the closest thing you can get ...

Informtaion at
http://www.db2click.com/tip_month.htm
under event monitoring and event monitoring - using pipes

HTH

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.

Last edited by sathyaram_s; 12-13-04 at 12:59.
Reply With Quote
  #3 (permalink)  
Old 12-13-04, 12:56
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
I would look at the Dynamic SQL snapshot:

GET SNAPSHOT FOR DYNAMIC SQL ON database-alias

You will need to turn the Dynamic SQL Monitor switch on in the DBM
configuration for the instance. This is not really a point in time snapshot,
but covers the period from when you turn the monitor switch on until you
take the snapshot. The monitor data can be flushed explicitly with RESET
MONITOR or is cleared when the database is deactivited.

You can output the data to a file or a DB2 table (version 8 only).

See the System Monitor Guide and Reference.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
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