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 > Enabling trace through a datasource - HOWTO

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-07-09, 07:41
andrewhallam andrewhallam is offline
Registered User
 
Join Date: Dec 2003
Location: Nottingham, England
Posts: 52
Enabling trace through a datasource - HOWTO

Informix - 11.10.UC1
App server = JBoss

Can someone please tell me how to enable an SQL trace via a datasource with Informix?
I've been searching all morning but no luck...

i.e. with DB2 you do:

<connection-url>jdbc:db2://testserver:50000/TEST:deferPrepares=0;traceFile=/tmp/DB2/trace.txt;traceLevel=3;</connection-url>

But how to do this in Informix?

Do you use <new-connection-sql>TRACE ON</new-connection-sql> or something? - but where do you specify the output file?

Or do you specify it in the <connection-url>...</connection-url> ?

Here is my datasource:

<datasources>
<local-tx-datasource>
<jndi-name>database-traindb</jndi-name>
<connection-url>jdbc:informix-sqli://testserver:1077/traindb:INFORMIXSERVER=ids_rhes;</connection-url>
<driver-class>com.informix.jdbc.IfxDriver</driver-class>
<user-name>informix</user-name>
<password>informix</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.Inform ixExceptionSorter</exception-sorter-class-name>
<!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>
-->
</local-tx-datasource>
</datasources>


Many, many, MANY thanks for any help on this

Andy
Reply With Quote
  #2 (permalink)  
Old 01-11-09, 05:45
stanislav.ondac stanislav.ondac is offline
Registered User
 
Join Date: Aug 2005
Posts: 140
You can set SQLIDEBUG variable in your connection string to the specific trace file.(you'll get a binary trace, that you can read by a special utility-sqliprint)
But it is recommended used this feature only when directed by an IBM technical support(suppose for performance issues).

Also consider using global sql tracing('set sql tracing' command, or 'SQLTRACE' onconfig parameter)
Reply With Quote
  #3 (permalink)  
Old 03-31-10, 00:00
cryptofive cryptofive is offline
Registered User
 
Join Date: Mar 2010
Posts: 1
Another option is to use some JDBC Logging proxy tool, i.e. jdbcdslog.
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