ISOLATION bind option
The ISOLATION option determines how far to isolate an application from the effects of other running applications.
Command option | Option values | Used with |
---|---|---|
ISOLATION |
|
Note:
- The ISOLATION bind option is not valid for REBIND of packages for native SQL procedures or advanced triggers.
- ISOLATION(CS)
- The cursor stability option ensures, like repeatable read, that your application does not read a row that another process changes until that process releases that row. Unlike repeatable read, cursor stability does not prevent other applications from changing rows that your application reads before your program commits or terminates.
- ISOLATION(RR)
- The Repeatable read option ensures that:
- Your application does not read a row that another process has changed until that process releases that row.
- Other processes do not change a row that your application reads until your application commits or terminates.
- ISOLATION(RS)
- The read stability option ensures that:
- Your application does not read a row that another process has changed until that process releases that row.
- Other processes do not change a row that satisfies the application's search condition until your application commits or terminates. It does allow other application processes to insert a row, or to change a row that did not originally satisfy the search condition.
If the server does not support RS, it uses RR.
- ISOLATION(UR)
- The uncommitted read option. Unlike repeatable read and cursor stability, does not ensure anything. With the exception of LOB data, uncommitted read avoids acquiring locks on data and allows:
- Other processes change any row your application reads during the unit of work.
- Your application read any row that another process has changed, even if the process has not committed the row.
You can use this option only with a read-only operation: SELECT, SELECT INTO, or FETCH using a read-only cursor. If you specify ISOLATION(UR) for any other operation, Db2 uses ISOLATION(CS) for that operation.
- ISOLATION(NC)
- The no commit option is used on packages that are bound to certain servers other than Db2 for z/OS®. Db2 for z/OS does not support NC. If the server does not support this isolation level, it uses UR.
Default values for ISOLATION
Process | Default value |
---|---|
BIND SERVICE | CS |
BIND PLAN | CS |
BIND PACKAGE |
|
REBIND PLAN | Existing value |
REBIND PACKAGE | Existing value. You cannot change ISOLATION from a specified value to a default of the plan value by using REBIND PACKAGE. To do that, you must use BIND PACKAGE ACTION(REPLACE). |
Catalog records for ISOLATION
See the ISOLATION column in SYSPACKAGE catalog table and SYSPLAN catalog table.