Powered by Zoomin Software. For more details please contactZoomin

DataDirect OpenAccess SDK Help

Using DataDirect Spy with JDBC Data Sources

  • Last Updated: May 12, 2026
  • 1 minute read
    • OpenAccess SDK
    • Version 8.1
    • Documentation

The JDBC driver implements the following features defined by the JDBC 2.0 Optional Package:

  • JNDI for Naming Databases
  • Connection Pooling

You can use Spy to track JDBC calls with all of these features. The com.ddtek.jdbcx.openaccess.OpenAccessDataSource class supports the SpyAttributes connection attribute, which specifies a semi-colon-separated list of Spy attributes as described in DataDirect Spy Attributes. See JDBC Connection URL Examples for more information about configuring JDBC data sources.

The following examples create an OpenAccessDataSource and specifies that all JDBC calls must be logged in the file /tmp/spy.log, including the name of the current thread:

...
OpenAccessDataSource sds=new OpenAccessDataSource():
sds.setServerName("MyServer");
sds.setPortNumber(1234);
sds.setSpyAttributes("log=(file)/tmp/spy.log;logTName=yes");
Connection conn=sds.getConnection("scott","tiger");
...
TitleResults for “How to create a CRG?”Also Available inAlert