Skip to content

Setting Transaction Isolation

The transaction isolation level decides how changes made by others at the same time affect your transactions, and how your changes affect theirs.

To set the isolation level for a connection:

  1. Double-click the connection in the Databases tab, and select the Properties tab.
  2. In the Transaction category, select the level in Transaction Isolation.

The default, Do not Set, keeps the level of the database or driver. Which other levels you can choose depends on the database. For many databases, they are the standard JDBC levels below. Some databases have their own names or levels, for example READ COMMITTED and SERIALIZABLE for Oracle. See the documentation of your database.

LevelDirty readsNon-repeatable readsPhantom reads
TRANSACTION_READ_UNCOMMITTEDAllowedAllowedAllowed
TRANSACTION_READ_COMMITTEDPreventedAllowedAllowed
TRANSACTION_REPEATABLE_READPreventedPreventedAllowed
TRANSACTION_SERIALIZABLEPreventedPreventedPrevented
  • Dirty read: transaction A reads a value that transaction B has changed but not committed yet.
  • Non-repeatable read: transaction A reads a row twice, and gets different values because transaction B changed the row in between.
  • Phantom read: transaction A runs the same query twice, and gets an extra row because transaction B added or changed a row in between.