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.
Using WITH UR in DB2.
- Robert Sample
- Global Moderator
- Posts: 1896
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Using WITH UR in DB2.
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.
Re: Using WITH UR in DB2.
Thanks Robert. I am thinking what can be the mainframe production scenarios for this. Thanks for your thoughts on this.
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