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.cassandra.CassandraDriver");
DriverManager.getConnection("jdbc:datadirect:cassandra:
//MyServer:9042;keyspaceName=MyKS;fetchSize=50;
spyAttributes=(log=(file)c:\\temp\\spy.log)","test04", "test04");
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:cassandra://MyServer:9042;CONNECTIONRETRYCOUNT=5;
ALTERNATESERVERS=;DATABASENAME=;INITIALIZATIONSTRING=;AUTHENTICATIONMETHOD=none;
SPYATTRIBUTES=(log=(file)c:\temp\spy.log);TRANSACTIONMODE=noTransactions;
JAVADOUBLETOSTRING=false;CONNECTIONRETRYDELAY=1;INSENSITIVERESULTSETBUFFERSIZE=2048;
MAXPOOLEDSTATEMENTS=0;LOADBALANCING=false;CONVERTNULL=1; CREATEMAP=notExist;
IMPORTSTATEMENTPOOL=;KEYSPACENAME=MyKS)
spy>> DatabaseMetaData[1].getDriverName()
spy>> OK (Cassandra)
spy>> DatabaseMetaData[1].getDriverVersion()
spy>> OK (3.60.0 (000000.000000.000000))
spy>> DatabaseMetaData[1].getDatabaseProductName()
spy>> OK (Cassandra)
spy>> DatabaseMetaData[1].getDatabaseProductVersion()
spy>> OK (Cassandra - 2.1.0)
spy>> Connection Options :
spy>> CONNECTIONRETRYCOUNT=5
spy>> ALTERNATESERVERS=
spy>> DATABASENAME=
spy>> INITIALIZATIONSTRING=
spy>> AUTHENTICATIONMETHOD=none
spy>> SPYATTRIBUTES=(log=(file)c:\temp\spy.log)
spy>> JAVADOUBLETOSTRING=false
spy>> CONNECTIONRETRYDELAY=1
spy>> INSENSITIVERESULTSETBUFFERSIZE=2048
spy>> MAXPOOLEDSTATEMENTS=0
spy>> LOADBALANCING=false
spy>> CONVERTNULL=1
spy>> CREATEMAP=notExist
spy>> IMPORTSTATEMENTPOOL=
spy>> KEYSPACENAME=MyKS
spy>> Driver Name = Cassandra
spy>> Driver Version = 6.0.0 (000000.000000.000000)
spy>> Database Name = Cassandra
spy>> Database Version = Cassandra - 2.1.0
spy>> Connection[1].getWarnings()
spy>> OKspy>> Connection[1].createStatement
spy>> OK (Statement[1])
spy>> Statement[1].executeQuery(String sql)
spy>> sql = select empno,ename,job from emp where empno=7369
spy>> OK (ResultSet[1])
spy>> ResultSet[1].getMetaData()
spy>> OK (ResultSetMetaData[1])
spy>> ResultSetMetaData[1].getColumnCount()
spy>> OK (3)
spy>> ResultSetMetaData[1].getColumnLabel(int column)
spy>> column = 1
spy>> OK (EMPNO)spy>> ResultSetMetaData[1].getColumnLabel(int column)
spy>> column = 2
spy>> OK (ENAME)
spy>> ResultSetMetaData[1].getColumnLabel(int column)
spy>> column = 3
spy>> OK (JOB)spy>> ResultSet[1].next()
spy>> OK (true)
spy>> ResultSet[1].getString(int columnIndex)
spy>> columnIndex = 1
spy>> OK (7369)
spy>> ResultSet[1].getString(int columnIndex)
spy>> columnIndex = 2
spy>> OK (SMITH)
spy>> ResultSet[1].getString(int columnIndex)
spy>> columnIndex = 3
spy>> OK (CLERK)
spy>> ResultSet[1].next()
spy>> OK (false)spy>> ResultSet[1].close()
spy>> OK
spy>> Connection[1].close()
spy>> OK