Class Hierarchy Previous Next Index
java.lang.Object | +----COM.cloudscape.vti.VTITemplate | +----COM.cloudscape.vti.CloudscapeLogReader
CloudscapeLogReader is a virtual table which shows all the statements of "interest" in cloudscape.log or the specified file when cloudscape.language.logStatementText=true
One possible use for this VTI is to determine the active transactions and the SQL statements in those transactions at a given point in time, say when a deadlock or lock timeout occurred. In order to do that, you must first find the timestamp (timestampConstant) of interest in cloudscape.log. The SQL to view the active transactions at a given in time is:
SELECT vti.ts, threadid, cast(xid as int) as xid_int, cast(lccid as int) as lccid_int, logtext FROM new COM.cloudscape.vti.CloudscapeLogReader() vti, (VALUES timestampConstant) t(ts) WHERE vti.ts <= t.ts AND vti.ts > (SELECT MAX(ts) IS NULL ? '2000-01-01 00:00:00.1' : MAX(ts) FROM new COM.cloudscape.vti.CloudscapeLogReader() vti_i WHERE (logtext LIKE 'Committing%' OR logtext LIKE 'Rolling%') AND vti.xid = vti_i.xid AND ts < t.ts) ORDER BY xid_int, vti.ts
The CloudscapeLogReader virtual table has the following columns:
public CloudscapeLogReader()
public CloudscapeLogReader(java.lang.String inputFileName)
public java.sql.ResultSetMetaData getMetaData()
public boolean next() throws java.sql.SQLException
public void close()
public java.lang.String getString(int columnNumber) throws java.sql.SQLException
public boolean wasNull()
Class Hierarchy Previous Next Index