Using the Snapshot Isolation Level
- Last Updated: January 16, 2018
- 1 minute read
- DataDirect Connectors
- JDBC
- IBM Db2 5.1
- MySQL 5.1
- Progress OpenEdge 5.1
- SAP Sybase 5.1
- Documentation
The Snapshot isolation level is supported for SQL Server 2005 and higher. You can use the Snapshot isolation level in either of the following ways:
- Setting the SnapshotSerializable property changes the behavior of the Serializable isolation level to use the Snapshot isolation level. This allows an application to use the Snapshot isolation level with no or minimum code changes. See SnapshotSerializable for more information.
- Importing the ExtConstants class allows you to specify the TRANSACTION_SNAPSHOT or
TRANSACTION_SERIALIZABLE isolation levels for an individual statement in the same
application. The ExtConstants class in the com.ddtek.jdbc.extensions package defines the
TRANSACTION_SNAPSHOT constant. For example, the following code imports the ExtConstants
class and sets the TRANSACTION_SNAPSHOT isolation level:
import com.ddtek.jdbc.extensions.ExtConstants;Connection.setTransactionIsolation(ExtConstants.TRANSACTION_SNAPSHOT);