Search This Blog

Friday, October 21, 2016

Enable JDBC Tracing with ODI (p6spy)

Enable JDBC Tracing with ODI (p6spy)
Create a directory c:\temp\p6spy

Copy the file p6spy.jar to c:\temp\p6spy

Create a new file c:\temp\p6spy\spy.properties with the following
contents

++++++++++
realdatasourceclass=oracle.jdbc.driver.OracleDriver
autoflush=true
logfile=c:/temp/spy.log
append=false
+++++++++


Open the file odi.conf file and add the following lines

after the line

AddJavaLibFile ../../../oracle_common/modules/features/com.oracle.db.jdbc7-dms.jar

+++
AddJavaLibFile c:/temp/p6spy/
AddJavaLibFile c:/temp/p6spy/p6spy.jar
+++

Invoke odi and edit the connection setting

For the JDBC driver name specify it as
com.p6spy.engine.spy.P6SpyDriver

and change the JDBC url to

jdbc:p6spy:oracle:thin:@localhost:1521:orcl

Perform some operations and you should see a file c:/temp/spy.log with the following

1477027846045|193|statement|connection 0|SELECT COUNT(*) FROM EMP,EMP,EMP,EMP,EMP|

Here 193 is the time it took in ms and 1477027846045 is the The Current Unix Timestamp


Tags: Publish
October 21, 2016 at 12:19PM
Open in Evernote

No comments: