Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2003
    Location
    NY
    Posts
    3

    Question Unanswered: Tracing session DML

    How can I trace all DML (select/insert/update) applied by a user/session?
    I know that I can use onstat to get the last sql statement but I need all statements.

    Thnx
    Howard

    htarlow@oriontelcorp.net

  2. #2
    Join Date
    Aug 2002
    Location
    Bonn/Germany
    Posts
    152
    You can set the SQLIDEBUG environment variable on
    the client side.

    This will trace all SQL statements exchanged between the
    client (your application) and the databaseserver.

    You normally set SQLIDEBUG in the environment where you
    start your client program:

    export SQLIDEBUG=2:/<directory_name>

    After starting your client program, there are binary files
    created under the above directory.

    You can use sqliprint to analyze these files.
    Check 'sqliprint -h'.

    You can also set SQLIDEBUG before starting 'oninit'. However
    this will produce a lot of trace files for every connected
    database session, so I would not recommend this.

    sqliprint is delivered with the ClientSDK and is an undocumented
    tool.

    Best regards

    Eric
    --
    IT-Consulting Herber
    WWW: http://www.herber-consulting.de
    Email: eric@herber-consulting.de

    ***********************************************
    Download the IFMX Database-Monitor for free at:
    http://www.herber-consulting.de/BusyBee
    ***********************************************

  3. #3
    Join Date
    Jul 2003
    Location
    Beijing China
    Posts
    36
    $ sqliprint -h
    Usage: sqliprint [-tuple] [-blob] [-min] [-cmd_time] [-nocsc] [-summary]
    [-stmt_stat [-order_cnt] [-per_thread] [-nogroup]]
    [-notimestamp] [-o outfile] [-V] inpfile
    -tuple : hex value of TUPLES in PUT and FETCH
    -blob : hex value of BLOBS in PUT and FETCH
    -min : only print the most minimum information
    -udt : print hex value of Fix/Var Binary
    -cmd_time : print timing info for each command
    -nocsc : turn off codeset convertion
    -summary : print summary information at the end
    -stmt_stat : print statement statistics grouped by SQL
    -order_cnt : order statement stats by count (default: time)
    -per_thread : stmt stats per thread
    -nogroup : do not group stmt stats by SQL text
    -notimestamp: don't print the timestamp
    -isprint : only print printable characters(Data)
    -o outfile : generate the output to outfile
    -V : print version
    inpfile : sqlidebug file

Posting Permissions

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