How to Track JDBC Calls with DataDirect Spy
By sakthi on Jun 14, 2006
You could track the JDBC calls made using the Sun JDBC Driver (rebranded DataDirect Connect for JDBC Driver) using DataDirect Spy included with the Sun JDBC Driver.
To use the DataDirect Spy with Sun Java Studio Creator:
- You need to add new Database Server Type. Call it 'OracleSpy', Choose smbase.jar, smutil.jar, smoracle.jar & smspy.jar from $creator_installdir/rave2.0/core/ directory, click Suggest to get the DriverClassName, Enter the JDBC url like: jdbc:sun:oracle://#HOSTNAME:1521;SID=#DATABASE;SpyAttributes=(log=(file)C:\\\\temp\\\\spy.log;linelimit=80;logTName=yes;timestamp=yes)");
- Add a datasource using the newly added server type
- View the log file C:\\\\temp\\\\spy.log for JDBC calls being tracked
- With every operation in the IDE (like Adding datasource, consuming tables in project via drag and drop, opening query editor on a rowset, deploying/running the project) JDBC calls would be made and all those tracking information will be routed to this spy.log
Both at design time and runtime, Creator and CreatorApps make jdbc calls to fetch data and metadata. When query editor on a rowset is opened for the firsttime after the project is opened, it fetches the metadata, so it is likely to make a little more time for the first time. Sucessive opening of the rowset in query editor could be faster (as long as the project is opened).
For more info on using DataDirect Spy refer: http://media.datadirect.com/download/docs/jdbc/jdbcref/diagnostics.html#wp615221