Class Hierarchy    Previous  Next  Index

Class COM.cloudscape.vti.CloudscapeLogReader

java.lang.Object
    |
    +----COM.cloudscape.vti.VTITemplate
            |
            +----COM.cloudscape.vti.CloudscapeLogReader

public class CloudscapeLogReader
extends VTITemplate
Copyright © 1998-2000, Informix Software, Inc. All rights reserved.

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:


Constructor Index

 o CloudscapeLogReader()
CloudscapeLogReader() will access the cloudscape.LOG in cloudscape.system.home, if set, else in the current directory.
 o CloudscapeLogReader(String)
 

Method Index

 o close()
 
 o getMetaData()
 
 o getString(int)
All columns in CloudscapeLogReader VTI are of String type.
 o next()
 
 o wasNull()
 

Constructor Detail

 o CloudscapeLogReader
public CloudscapeLogReader()
          CloudscapeLogReader() will access the cloudscape.LOG in cloudscape.system.home, if set, else in the current directory. CloudscapeLogReader('filename') will access the specified file name.
 o CloudscapeLogReader
public CloudscapeLogReader(java.lang.String inputFileName)

Method Detail

 o getMetaData
public java.sql.ResultSetMetaData getMetaData()
See Also:
getMetaData
 o next
public boolean next() throws java.sql.SQLException
Throws:
java.sql.SQLException - Thrown on error.
See Also:
next
 o close
public void close()
See Also:
close
 o getString
public java.lang.String getString(int columnNumber) throws java.sql.SQLException
          All columns in CloudscapeLogReader VTI are of String type.
Throws:
java.sql.SQLException - Thrown on error.
Overrides:
getString in class VTITemplate
See Also:
getString
 o wasNull
public boolean wasNull()
Overrides:
wasNull in class VTITemplate
See Also:
wasNull

  Class Hierarchy    Previous  Next  Index