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 > Informix > Tracing session DML

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-17-03, 13:01
tarlow tarlow is offline
Registered User
 
Join Date: Feb 2003
Location: NY
Posts: 3
Question 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
Reply With Quote
  #2 (permalink)  
Old 07-25-03, 03:46
eherber eherber is offline
Registered User
 
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
***********************************************
Reply With Quote
  #3 (permalink)  
Old 07-25-03, 05:08
jh1213 jh1213 is offline
Registered User
 
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
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