Using WITH UR in DB2.

RDBMS from IBM.
Previous topicNext topic

Topic Author
Akshypal
Registered Member
Posts: 43
Joined: Sun Jun 16, 2013 9:51 am
Zodiac: Sagittarius

Using WITH UR in DB2.

Post by Akshypal » Mon Mar 27, 2017 12:04 pm

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: 1379
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
Zodiac: Virgo

Re: Using WITH UR in DB2.

Post by Robert Sample » Tue Mar 28, 2017 3:19 am

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.




Topic Author
Akshypal
Registered Member
Posts: 43
Joined: Sun Jun 16, 2013 9:51 am
Zodiac: Sagittarius

Re: Using WITH UR in DB2.

Post by Akshypal » Wed Nov 15, 2017 5:34 pm

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



Previous topicNext topic

Return to “IBM DB2.”