Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

SQL and the "WITH UR" clause

Posted on 2014-07-13
2
Medium Priority
?
7,429 Views
Last Modified: 2014-07-13
I need to know this for clarity sake.

On another thread, an expert posted that I should use the "WITH UR" clause in my select statement

Where UR equals Uncommitted Read

(Note this was from an issue stating that my SELECT SUM(BAL) FROM ACCT" was not issuing the correct summation, so there may be uncommitted  records within the table.

My question is:  Will the following command work in BOTH the CLP and the JDBC cclient connection.

SELECT SUM(BAL) FROM ACCT WITH UR

Open in new window


 In other words will the JDBC client connection be able to see the unread records as well as the CLP with this command ?  (I would think there is a possiblitliy that the CLP could see the unread, but not the JDBC, but I really dont know how this works)

Thanks
0
Comment
Question by:Anthony Lucia
2 Comments
 
LVL 37

Accepted Solution

by:
momi_sabag earned 2000 total points
ID: 40193265
Both will process it exactly the same
0
 
LVL 26

Expert Comment

by:Tomas Helgi Johannsson
ID: 40193292
Hi!

I did not suggest you always use  "with ur". Please make sure you understand what that means.
Reading uncommited data means that your program reads data that is in the process of being changed. If another program (session) is changing data that another reads and then the change is rolled back due to some reason, then the session reading the data will have read wrong status of the data.

http://www-01.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/com.ibm.db2z10.doc.perf/src/tpc/db2z_isour.dita?lang=en
http://db2portal.blogspot.com/2009/07/dirty-read-aka-uncommitted-read.html
http://www.toadworld.com/platforms/ibmdb2/w/wiki/6660.uncommitted-read-ur.aspx

Regards,
     Tomas Helgi
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month20 days, 23 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question