EasyManuals Logo

IBM DB2 User Manual

IBM DB2
585 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #89 background imageLoading...
Page #89 background image
DB2Connection ds = (DB2Connection) con;
// Invoke updateDB2XmlSchema
ds.updateDB2XmlSchema(
xmlSchemaNameQualifierTarget,
xmlSchemaNameTarget,
xmlSchemaNameQualifierSource,
xmlSchemaNameSource,
dropSourceSchema);
}
Transaction control in JDBC applications
In JDBC applications, as in other types of SQL applications, transaction control
involves explicitly or implicitly committing and rolling back transactions, and
setting the isolation level for transactions.
IBM Data Server Driver for JDBC and SQLJ isolation levels
The IBM Data Server Driver for JDBC and SQLJ supports a number of isolation
levels, which correspond to database server isolation levels.
JDBC isolation levels can be set for a unit of work within a JDBC program, using
the Connection.setTransactionIsolation method. The default isolation level can
be set with the defaultIsolationLevel property.
The following table shows the values of level that you can specify in the
Connection.setTransactionIsolation method and their DB2 database server
equivalents.
Table 17. Equivalent JDBC and DB2 isolation levels
JDBC value DB2 isolation level
TRANSACTION_SERIALIZABLE Repeatable read
TRANSACTION_REPEATABLE_READ Read stability
TRANSACTION_READ_COMMITTED Cursor stability
TRANSACTION_READ_UNCOMMITTED Uncommitted read
The following table shows the values of level that you can specify in the
Connection.setTransactionIsolation method and their IBM Informix Dynamic
Server (IDS) equivalents.
Table 18. Equivalent JDBC and IDS isolation levels
JDBC value IDS isolation level
java.sql.Connection.TRANSACTION_SERIALIZABLE Repeatable read
java.sql.Connection.TRANSACTION_REPEATABLE_READ Repeatable read
java.sql.Connection.TRANSACTION_READ_COMMITTED Committed read
java.sql.Connection.TRANSACTION_READ_UNCOMMITTED Dirty read
com.ibm.db2.jcc.DB2Connection.TRANSACTION_IDS_CURSOR_STABILITY IDS cursor stability
com.ibm.db2.jcc.DB2Connection.TRANSACTION_IDS_LAST_COMMITTED Committed read, last committed
Related concepts
“JDBC connection objects” on page 19
Chapter 3. JDBC application programming 73

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM DB2 and is the answer not in the manual?

IBM DB2 Specifications

General IconGeneral
DeveloperIBM
Initial Release1983
LicenseProprietary
Written inC, C++
CategoryDatabase Management System (RDBMS)
Operating SystemLinux, Windows
Programming LanguagesC, C++
Data ModelsRelational
EditionsCommunity, Standard, Advanced
Key Featureshigh availability, scalability