Go Go Gnome
the website of Sander Kooijmans

InitSQL does not work with ojdbc14

Posted: August 12, 2012

In a project my team used Tomcat 6 and ojdbc14. A connection pool was configured as a data source.

We wanted to execute a statement at the moment a new connection to the database was created. The documentation of Tomcat mentions the attribute initSQL of the data source.

After testing this feature we discovered that the statement was not executed. Using Wireshark I could confirm that the statement was not executed.

After searching the web for an hour I finally discovered a message about this problem. It turns out that this feature does not work with ojdbc14. Instead, try the newer ojdbc6.