org.apache.derby.diag |
|
Java Source File Name | Type | Comment |
ErrorLogReader.java | Class | ErrorLogReader is a virtual table interface (VTI) which contains all the statements
of "interest" in db2j.log or a specified file when
db2j.language.logStatementText=true.
One use of 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. |
ErrorMessages.java | Class | ErrorMessage shows all the SQLStates, locale-sensitive error
messages, and exception severities for a database.
To use it, query it as follows:
SELECT* FROM NEW org.apache.derby.diag.ErrorMessages() AS EQ;
The following columns will be returned:
- SQL_STATE--VARCHAR(5) - nullable.
|
LockTable.java | Class | LockTable is a virtual table that shows all locks currently held in
the database.
This virtual table can be invoked by calling it directly
select * from SYSCS_DIAG.LOCK_TABLE
The LockTable virtual table takes a snap shot of the lock table while
the system is in flux, so it is possible that some locks may be in
transition state while the snap shot is taken. |
SpaceTable.java | Class | SpaceTable is a virtual table that shows the space usage of a particular
table and its indexes.
This virtual table can be invoked by calling it
directly, and supplying the schema name and table name as arguments.
select * from new org.apache.derby.diag.SpaceTable('MYSCHEMA','MYTABLE') t;
If the schema name is not supplied, the default schema is used.
select * from new org.apache.derby.diag.SpaceTable('MYTABLE') t;
Alternatively, the table can be invoked through the system alias SpaceTable
select * from new SPACETABLE('MYTABLE') t;
NOTE: Both the schema name and the table name must be any expression that evaluates to a
string data type. |
StatementCache.java | Class | StatementCache is a virtual table that shows the contents of the SQL statement cache.
This virtual table can be invoked by calling it directly.
select * from new org.apache.derby.diag.StatementCache() t
The StatementCache virtual table has the following columns:
- ID CHAR(36) - not nullable.
|
StatementDuration.java | Class | StatementDuration is a virtual table which
can be used to analyze the execution duration of the statements
of "interest" in db2j.log or a specified file when
db2j.language.logStatementText=true.
A limitation is that, for each transaction ID,
a row will not be returned for the last statement with that
transaction id. |
TransactionTable.java | Class | TransactionTable is a virtual table that shows all transactions
currently in the database.
This virtual table can be invoked by calling it
directly
select * from SYSCS_DIAG.TRANSACTION_TABLE
The TransactionTable virtual table takes a snap shot of the
transaction table while the system is in flux, so it is possible that some
transactions may be in transition state while the snap shot is taken.
We choose to do this rather then impose extraneous timing restrictions so
that the use of this tool will not alter the normal timing and flow of
execution in the application. |