DataDirect Spy log example
This section provides information to help you understand the content of your own DataDirect Spy logs.
For example, suppose your application executes the following code and performs some operations:
Class.forName("com.ddtek.jdbc.autorest.AutoRESTDriver");
DriverManager.getConnection("jdbc:datadirect:autorest:config=D:\\work\\temp\\countries.rest;
spyAttributes=(log=(file)D:\\temp\\spy.log)");
The log file generated by DataDirect Spy would look similar to the following example. Notes provide explanations for the referenced text.
spy>> Connection[1].getMetaData()
spy>> OK (DatabaseMetaData[1])
spy>> DatabaseMetaData[1].getURL()
spy>> OK
(jdbc:datadirect:autorest:;JDBCBEHAVIOR=1;APPLICATIONNAME=;KEYPASSWORD=;WSFETCHSIZE=10000;
STRINGTRUNCATIONMETHOD=truncate;PROXYHOST=;CATALOGOPTIONS=2;WSPOOLSIZE=1;CREATEMAP=Session;
ACCESSTOKEN=;DECIMALROUNDINGMETHOD=round;BULKLOADBATCHSIZE=10000;DATABASENAME=;
STMTCALLLIMIT=0;CONNECTIONRETRYDELAY=1;REFRESHTOKEN=;READONLY=false;CLIENTUSER=;
TIMELITERALDEFAULTTIMEZONE=local;WORKAROUNDS=0;BINARYTRUNCATIONMETHOD=keep;CONVERTNULL=1;
RECORDRESTEVENTS=false;CONNECTIONRETRYCOUNT=5;READAHEAD=0;
CONFIG=file:D:\\work\\temp\\countries.rest;TRUSTSTORE=;STMTCALLLIMITBEHAVIOR=ErrorAlways;
SCOPE=;LOADLIBRARYPATH=;MAXPOOLEDSTATEMENTS=0;CLIENTID=;CRYPTOPROTOCOLVERSION=;
QUERYTIMEOUT=0;PROXYPASSWORD=;TRANSACTIONMODE=NoTransactions;WSRETRYCOUNT=5;PROGRAMID=;
PROXYPORT=0;SECURERANDOMALGORITHM=;DEBUGPLAYBACK=;REGISTERSTATEMENTPOOLMONITORMBEAN=false;
IMPORTSTATEMENTPOOL=;SERVERPATH=;LOADBALANCING=false;KEYSTOREPASSWORD=;LOGINTIMEOUT=0;
AUTHPARAM=;WSTIMEOUT=120;RANDOMGENERATOR=SECURERANDOM;PROXYUSER=;FAILOVERGRANULARITY=nonAtomic
;ACCOUNTINGINFO=;LOGCONFIGFILE=ddlogging.properties;ENCRYPTIONMETHOD=SSL;SCHEMAVIEW=both;
OAUTHCODE=;FAILOVERMODE=connect;_USERHASH=;INITIALIZATIONSTRING=;
BATCHPERFORMANCEWORKAROUND=false;JAVADOUBLETOSTRING=false;DEBUGRECORD=;
AUTHENTICATIONMETHOD=None;CLIENTHOSTNAME=;CONFIGOPTIONS=CONFIG=file:D:\\work\\temp\\countries.rest;
AUTHHEADER=;REFRESHSCHEMA=false;FAILOVERPRECONNECT=false;RESULTSETMETADATAOPTIONS=0;
D2CDATASTOREID=0;SPYATTRIBUTES=(log=(file)D:\\work\\temp\\spy.log);
INSENSITIVERESULTSETBUFFERSIZE=2048;FETCHSIZE=100;SECURITYTOKEN=;SCHEMAMAP=;CLIENTSECRET=;
ALTERNATESERVERS=;TRUSTSTOREPASSWORD=;REFRESHDIRTYCACHE=true;KEYSTORE=)
spy>> DatabaseMetaData[1].getDriverName()
spy>> OK (AutoREST)
spy>> DatabaseMetaData[1].getDriverVersion()
spy>> OK (6.0.0.0000 (C0000.F000000.U000000))
spy>> DatabaseMetaData[1].getDatabaseProductName()
spy>> OK (AutoREST)
spy>> DatabaseMetaData[1].getDatabaseProductVersion()
spy>> OK (41.0)
spy>> Connection Options :
spy>> JDBCBEHAVIOR=1
spy>> APPLICATIONNAME=
spy>> KEYPASSWORD=
spy>> WSFETCHSIZE=10000
spy>> STRINGTRUNCATIONMETHOD=truncate
spy>> ...
spy>> DECIMALROUNDINGMETHOD=round
spy>> BULKLOADBATCHSIZE=10000
spy>> DATABASENAME=
spy>> STMTCALLLIMIT=0
spy>> CONNECTIONRETRYDELAY=1
spy>> ...
spy>> CLIENTSECRET=
spy>> ALTERNATESERVERS=
spy>> TRUSTSTOREPASSWORD=
spy>> REFRESHDIRTYCACHE=true
spy>> KEYSTORE=
spy>> Driver Name = AutoREST
spy>> Driver Version = 6.0.0.0000 (C0000.F000000.U000000))
spy>> Database Name = AutoREST
spy>> Database Version = 1.0
spy>> Connection[1].getMetaData()
spy>> OK (DatabaseMetaData[2])
spy>> DatabaseMetaData[2].getURL()
spy>> OK (jdbc:datadirect:autorest:;JDBCBEHAVIOR=1;APPLICATIONNAME=;KEYPASSWORD=;
WSFETCHSIZE=10000; … )
spy>> OK (1)
spy>> Connection[1].createStatement
spy>> OK (Statement[1])
spy>> Statement[1].executeQuery(String sql)
spy>> sql = SELECT * FROM WEEKLYTIMESERIES
spy>> OK (ResultSet[1])
spy>> ResultSet[1].getMetaData()
spy>> OK (ResultSetMetaData[1])
spy>> ResultSetMetaData[1].getColumnCount()
spy>> OK (7)
spy>> ResultSetMetaData[1].getColumnLabel(int column)
spy>> column = 1
spy>> OK (COUNTRIES_METADATA_1INFORMATION)
spy>> ResultSetMetaData[1].getColumnLabel(int column)
spy>> column = 2
spy>> OK (KEY)
spy>> ResultSet[1].next()
spy>> OK (true)
spy>> ResultSet[1].getString(int columnIndex)
spy>> columnIndex = 1
spy>> OK (Weekly Prices)
spy>> ResultSet[1].getString(int columnIndex)
spy>> columnIndex = 2
spy>> OK (1982-11-09)
spy>> ResultSet[1].getString(int columnIndex)
spy>> columnIndex = 2
spy>> OK (CLERK)
spy>> ResultSet[1].next()
spy>> OK (false)
spy>> ResultSet[1].close()
spy>> OK
spy>> Statement[1].close()
spy>> OK
spy>> Connection[1].close()
spy>> OK