Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need some help in setting the isolation Level

Status
Not open for further replies.

gbag

IS-IT--Management
Oct 19, 2003
47
US
Hi,
I have a strange situation. Need some help.
I executed the db2expln command on a simple SELECT
statement [select * from emp where emp_id=10]. In the
output it said the isolation level as Cursor Stability
[CS]. This is fine.
But when I did the same thing with the sql statement
as
"select * from employee where emp_id=10 with UR"
Then also in the output it said the isolation level as
Cursor Stablility.
Is this an expected output? If yes, how to put the
SQLs in UR level. This I executed on the system where
the server is installed. [AIX, DB2 8.1]
I was thinking that by putting the isolation level in the
SQL statement, we can control the isolation levels.
But this disproves that.
Pls advice me.
Thanks in advance
Girish.
 
According to my DBA, for dynamic SQL you must set the required isolation before the connection.

db2 terminate
db2 change isolation to ur
db2 connect to dbname

In a program, when declaring a cursor add:
FOR FETCH ONLY WITH UR
 
Thanks BrianTyler for your suggestion. I appreciate your help.
Girish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top