View Single Post
  #1 (permalink)  
Old 01-07-09, 08: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