sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Elixir,
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,
Code: |
Step 1:
Set the following values in spufi,
AUTOCOMMIT ...... ===> NO
ISOLATION LEVEL ===> RR (RR=Repeatable Read, CS=Cursor Stability,
UR=Uncommitted Read)
Stetp 2:
Execute a simple query like,
SELECT EMPE_NO,EMP_NAME,CCRF_COST_CNTER_CD,
CODM_LAWS_ACCT_CD
FROM BOBT1.EMPINFO
WHERE CCRF_COST_CNTER_CD=100
Step 3:
You will get the results and in the next screen, it will ask you commit or rollback.
Dont' enter any values(commit / rollback).
Step 4:
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.
Step 5:
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
Thanks,
Sushanth |
|