Db2Systemmonitor Interface - IBM DB2 Manual

Table of Contents

Advertisement

getIDSSQLStatementOffSet

DB2SystemMonitor interface

The com.ibm.db2.jcc.DB2SystemMonitor interface is used for collecting system
monitoring data for a connection. Each connection can have one DB2SystemMonitor
instance.
DB2SystemMonitor fields
The following fields are defined only for the IBM Data Server Driver for JDBC and
SQLJ.
public final static int RESET_TIMES
public final static int ACCUMULATE_TIMES
DB2SystemMonitor methods
The following methods are defined only for the IBM Data Server Driver for JDBC
and SQLJ.
356
Application Programming Guide and Reference for Java
public long getIDSSerial8()
throws java.sql.SQLException
Retrieves an automatically generated key from a SERIAL8 column after the
automatically generated key was inserted by a previously executed INSERT
statement.
The following conditions must be true for getIDSSerial8 to execute
successfully:
v The INSERT statement is the last SQL statement that is executed before this
method is called.
v The table into which the row is inserted contains a SERIAL8 column.
v The form of the JDBC Connection.prepareStatement method or
Statement.executeUpdate method that prepares or executes the INSERT
statement does not have parameters that request automatically generated
keys.
This method applies only to connections to IDS data sources.
Format:
public int getIDSSQLStatementOffSet()
throws java.sql.SQLException
After an SQL statement executes on an IDS data source, if the statement has a
syntax error, getIDSSQLStatementOffSet returns the offset into the statement
text of the syntax error.
getIDSSQLStatementOffSet returns:
v 0, if the statement does not have a syntax error.
v -1, if the data source is not IDS.
This method applies only to connections to IDS data sources.
Related reference
"DB2PreparedStatement interface" on page 351
These values are arguments for the DB2SystemMonitor.start method.
RESET_TIMES sets time counters to zero before monitoring starts.
ACCUMULATE_TIMES does not set time counters to zero.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents