Joined: 29 Jul 2008
RR is more restrictive than RS, because every row that is referenced is locked and another application cannot insert or update a row that would be added to the list of rows referenced by a query if that query were to be executed again in that UOW.
You can do a simple test using SPUFI to know how RR works,
Set the following values in spufi,
AUTOCOMMIT ...... ===> NO
ISOLATION LEVEL ===> RR (RR=Repeatable Read, CS=Cursor Stability,
Execute a simple query like,
You will get the results and in the next screen, it will ask you commit or rollback.
Dont' enter any values(commit / rollback).
Submit a batch DSNTEP2 job to insert a row like,
INSERT INTO BOBT1.EMPINFO VALUES(199,'TEST',100,'Z');
The Batch job will wait, till you do an commit/rollback in the SPUFI.
Commit in spufi, you will get a message that batch job is successfully executed.
Repeat the same test after changing the isolation level to CS in spufi,
ISOLATION LEVEL ===> CS