Using WITH UR in DB2.

RDBMS from IBM and IBM's Hierarchical DBMS and Transaction Manager (IMS DC).
Post Reply
Akshypal
Registered Member
Posts: 54
Joined: Sun Jun 16, 2013 9:51 am

Using WITH UR in DB2.

Post by Akshypal »

Hi,

Usually we are not allowed to use uncommited read in the COBOL programs. Then what is the purpose of using uncommitted read in DB2 SQL queries? Are there some advantages and disadvantages of it.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1886
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Using WITH UR in DB2.

Post by Robert Sample »

One of the advantages is that it lets you know what the current state of the data is without waiting for locks to resolve. One big disadvantage is that a ROLLBACK may occur and hence change the current state of the data. Some companies, for example, let customers order an item as long as it is in stock (even if the uncommitted read shows somebody else is ordering the item; if that order completes then the company will issue a back-order letter to the other customer). There are times when it is convenient to know the current status of something, even though you know in an hour (minute, day, week ... whatever) the status will be different.
Akshypal
Registered Member
Posts: 54
Joined: Sun Jun 16, 2013 9:51 am

Re: Using WITH UR in DB2.

Post by Akshypal »

Thanks Robert. I am thinking what can be the mainframe production scenarios for this. Thanks for your thoughts on this.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “IBM DB2 and IMS DB/DC”