How to Track JDBC Calls with DataDirect Spy



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
Comments:

Post a Comment:
Comments are closed for this entry.
About

sakthi

Search

Archives
« July 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today