DBA > Job Interview Questions > DERBY Java Database FAQs

How to configure Isolation Levels?

More DBA job interview questions and answers at http://dba.fyicenter.com/Interview-Questions/

(Continued from previous question...)

How to configure Isolation Levels?

If a connection does not specify its isolation level, it inherits the default isolation level for the Derby system, The default value is CS. When set to CS, the connection inherits the TRANSACTION_READ_COMMITTED isolation level. When set to RR, the connection inherits the TRANSACTION_SERIALIZABLE isolation level, when set to RS, the connection inherits the TRANSACTION_REPEATABLE_READ isolation level, and when set to UR, the connection inherits the TRANSACTION_READ_UNCOMMITTED isolation level.

To override the inherited default, use the methods of java.sql.Connection.

In addition, a connection can change the isolation level of the transaction within an SQL statement. For more information, see "SET ISOLATION statement" in the Derby Reference Manual. You can use the WITH clause to change the isolation level for the current statement only, not the transaction. For information about the"WITH clause," .

In all cases except when you change the isolation level using the WITH clause, changing the isolation level commits the current transaction.

(Continued on next question...)

Other Job Interview Questions