Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2004
    Posts
    1

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

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    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
    Last edited by sathyaram_s; 12-13-04 at 13:59.
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

Posting Permissions

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