Nonstop Database, HiRDB Version 9 UAP Development Guide
The information to be acquired in the Exception trace log is the calling and return of methods described in the java.sql package found in the API specifications of Java 2 Platform, Standard Edition, Version 1.4.
Methods that satisfy all of the following conditions are acquired:
Methods that only look up and return information found in objects or only store information into objects, such as the ResultSet.getXXX, PreparedStatement.setXXX, and Connection.isClosed methods, are not acquisition targets.
The table below lists the methods that are acquisition targets of the Exception trace log. The table also provides the trace acquisition levels of the methods.
Table 18-87 Methods that are acquisition targets of the Exception trace log and their trace acquisition levels
Class | Method | Trace acquisition level | ||||
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5#1 | ||
CallableStatement | void close()#6 | Y | Y | Y | Y | Y |
boolean execute()#2 #6 | -- | Y | Y | Y | Y | |
ResultSet executeQuery()#2, #6 | -- | Y | Y | Y | Y | |
int executeUpdate()#2, #6 | -- | Y | Y | Y | Y | |
boolean execute(String sql)#3, #6 | Y | Y | Y | Y | Y | |
int[] executeBatch()#6 | -- | Y | Y | Y | Y | |
ResultSet executeQuery(String sql)#3, #6 | Y | Y | Y | Y | Y | |
int executeUpdate(String sql)#3, #6 | Y | Y | Y | Y | Y | |
Connection | void close() | Y | Y | Y | Y | Y |
void commit() | -- | Y | Y | Y | Y | |
Statement createStatement()#2 | Y | Y | Y | Y | Y | |
Statement createStatement(int resultSetType, int resultSetConcurrency)#3 | Y | Y | Y | Y | Y | |
DatabaseMetaData getMetaData() | -- | Y | Y | Y | Y | |
CallableStatement prepareCall(String sql)#2 | Y | Y | Y | Y | Y | |
CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency)#3 | Y | Y | Y | Y | Y | |
PreparedStatement prepareStatement(String sql)#2 | Y | Y | Y | Y | Y | |
PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency)#3 | Y | Y | Y | Y | Y | |
void rollback()#2 | -- | Y | Y | Y | Y | |
void setAutoCommit(boolean autoCommit) | -- | Y | Y | Y | Y | |
DatabaseMetaData | ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern) | -- | Y | Y | Y | Y |
ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) | -- | Y | Y | Y | Y | |
ResultSet getCatalogs() | -- | Y | Y | Y | Y | |
ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) | -- | Y | Y | Y | Y | |
ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) | -- | Y | Y | Y | Y | |
Connection getConnection() | -- | Y | Y | Y | Y | |
ResultSet getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema) | -- | Y | Y | Y | Y | |
ResultSet getExportedKeys(String catalog, String schema, String table) | -- | Y | Y | Y | Y | |
ResultSet getImportedKeys(String catalog, String schema, String table) | -- | Y | Y | Y | Y | |
ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) | -- | Y | Y | Y | Y | |
ResultSet getPrimaryKeys(String catalog, String schema, String table) | -- | Y | Y | Y | Y | |
ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) | -- | Y | Y | Y | Y | |
ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) | -- | Y | Y | Y | Y | |
ResultSet getSchemas() | -- | Y | Y | Y | Y | |
ResultSet getSuperTables(String catalog, String schemaPattern, String tableNamePattern) | -- | Y | Y | Y | Y | |
ResultSet getSuperTypes(String catalog, String schemaPattern, String typeNamePattern) | -- | Y | Y | Y | Y | |
ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) | -- | Y | Y | Y | Y | |
ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) | -- | Y | Y | Y | Y | |
ResultSet getTableTypes() | -- | Y | Y | Y | Y | |
ResultSet getTypeInfo() | -- | Y | Y | Y | Y | |
ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) | -- | Y | Y | Y | Y | |
ResultSet getVersionColumns(String catalog, String schema, String table) | -- | Y | Y | Y | Y | |
Driver | Connection connect(String url, Properties info) | Y | Y | Y | Y | Y |
PreparedStatement | boolean execute()#2 | -- | Y | Y | Y | Y |
ResultSet executeQuery()#2 | -- | Y | Y | Y | Y | |
int executeUpdate()#2 | -- | Y | Y | Y | Y | |
ResultSetMetaData getMetaData() | -- | Y | Y | Y | Y | |
boolean execute(String sql)#3, #5 | Y | -- | Y | Y | Y | |
int[] executeBatch()#5 | -- | Y | Y | Y | Y | |
ResultSet executeQuery(String sql)#3, #5 | Y | Y | Y | Y | Y | |
int executeUpdate(String sql)#3, #5 | Y | Y | Y | Y | Y | |
ResultSet | boolean absolute(int row) | -- | Y | Y | Y | Y |
void afterLast() | -- | Y | Y | Y | Y | |
void beforeFirst() | -- | Y | Y | Y | Y | |
void close() | -- | Y | Y | Y | Y | |
boolean first() | -- | Y | Y | Y | Y | |
ResultSetMetaData getMetaData() | -- | Y | Y | Y | Y | |
Statement getStatement() | -- | Y | Y | Y | Y | |
boolean last() | -- | Y | Y | Y | Y | |
boolean next() | -- | Y | Y | Y | Y | |
boolean relative(int rows) | -- | Y | Y | Y | Y | |
boolean isAfterLast() | -- | Y | Y | Y | Y | |
boolean isBeforeFirst() | -- | Y | Y | Y | Y | |
boolean isLast() | -- | Y | Y | Y | Y | |
Statement | void cancel() | -- | Y | Y | Y | Y |
void close() | Y | Y | Y | Y | Y | |
boolean execute(String sql) | Y | Y | Y | Y | Y | |
int[] executeBatch() | -- | Y | Y | Y | Y | |
ResultSet executeQuery(String sql) | Y | Y | Y | Y | Y | |
int executeUpdate(String sql) | Y | Y | Y | Y | Y | |
ResultSet getResultSet() | -- | Y | Y | Y | Y | |
Blob | long position(Blob pattern,long start)#2 | -- | Y | Y | Y | Y |
long position(byte[] pattern, long start)#3 | -- | Y | Y | Y | Y | |
long length() | -- | Y | Y | Y | Y | |
byte[] getBytes(long pos, int length) | -- | Y | Y | Y | Y | |
InputStream | int read()#2 | -- | Y | Y | Y | Y |
int read(byte[] data, int data_offset,int data_len)#3 | -- | Y | Y | Y | Y | |
int read(byte[] data, int data_offset,int data_len)#4 | -- | Y | Y | Y | Y | |
DataSource | getConnection()#2 | Y | Y | Y | Y | Y |
getConnection(String username, String password)#3 | Y | Y | Y | Y | Y | |
ConnectionPoolDataSource | getPooledConnection()#2 | Y | Y | Y | Y | Y |
getPooledConnection(String username, String password)#3 | Y | Y | Y | Y | Y | |
PooledConnection | close() | Y | Y | Y | Y | Y |
getConnection() | Y | Y | Y | Y | Y | |
XADataSource | getXAConnection()#2 | Y | Y | Y | Y | Y |
getXAConnection(String username, String password)#3 | Y | Y | Y | Y | Y | |
XAConnection | getXAResource() | Y | Y | Y | Y | Y |
XAResource | commit(Xid xid, boolean onePhase) | -- | -- | Y | Y | Y |
end(Xid xid, int flags) | -- | -- | Y | Y | Y | |
forget(Xid xid) | -- | -- | Y | Y | Y | |
isSameRM(XAResource xares) | -- | -- | Y | Y | Y | |
prepare(Xid xid) | -- | -- | Y | Y | Y | |
recover(int flag) | -- | -- | Y | Y | Y | |
rollback(Xid xid) | -- | -- | Y | Y | Y | |
start(Xid xid, int flags) | -- | -- | Y | Y | Y |
Use the system properties or the client environment definitions to set the file output destination of the Exception trace log, the number of outputs to the file, the number of information items to be acquired in memory, and the trace acquisition level. The priorities are as follows:
Specify the following items in the client environment definitions:
For details about the specification values, see 6.6.4 Environment definition information.
If invalid values are specified in these client environment definitions, the facility for controlling the Exception trace log acquired when an SQLException is thrown assumes that values were not specified for these client environment definitions. In this situation, the defaults shown in the table below are assumed.
Specify in the system properties the items shown in the following table.
Table 18-88 System property settings for acquisition of the Exception trace log
Item | System property | Description | Default# |
---|---|---|---|
File output destination | HiRDB_for_Java_FileDIR | Specify the absolute path of the directory to which the Exception trace log is to be output. The Exception trace log is output immediately under the specified directory. | Current directory |
Number of outputs to the file | HiRDB_for_Java_FileOutNUM | Specify the maximum number of information items to be output to one file. Specify a value in the range from 1 to 50. The maximum number of information items to be output to one file is actually number of outputs to the file x number of acquisition items to be acquired in memory. For the number of outputs to the file, the formats from Format 2 to Format 4 shown in 18.15.2 Output formats are each counted as one output. The information items are output to memory in the sequence they were stored. If information items exceeding the maximum value are to be output to a file, the items are wrapped around into two files. The file names are as follows:
|
5 |
Number of information items to be acquired in memory | HiRDB_for_Java_OnMemNUM | Specify the maximum number of information items to be stored in memory. You can specify a value in the range from 500 to 10,000. For the information acquired in memory, each method shown in Table 18-87 is counted as one item. If the number of information items to be stored exceeds the maximum value, old information items are overwritten with new information items in chronological sequence. |
1,000 |
Trace acquisition level | HiRDB_for_Java_TraceLevel | Specify a trace acquisition level. You can specify a level in the range from 0 to 5. If you specify 5, all methods that are trace acquisition targets, including internally called methods, are acquired. If you specify 0, an Exception trace log is not acquired. |
1 |
All Rights Reserved. Copyright (C) 2011, Hitachi, Ltd.