IBM Support

Why Does an SQL Statement Coded with the 'WITH UR' Clause Take a Claim Against the Tablespace?

Question & Answer


Question

One is seeing a persistent application claimer on a tablespace, however the SQL statement being executed against the table contains the 'WITH UR' clause. It was thought that the coding of the 'WITH UR' clause would result in the SQL query not taking any locks.

Answer

Even with ISOLATION UR, the SQL statement will take a claim against the tablespace to alert any running utilities of it's presence as seen in the following excerpt from the REDBOOK titled "DB2 9 for z/OS: Resource Serialization and Concurrency Control":
___________________________________________________________________

An uncommitted read operation makes a claim on the table space, so an
application using UR isolation cannot run concurrently with a utility
that drains all claim classes.
___________________________________________________________________


For more on the above, and other locks and restrictions that an SQL statement with the WITH UR clause may take, please review the section titled "5.5.1 Read with no lock" in this same REDBOOK found at the URL link listed under Related Information below.

Also, as seen in the Information Center, under Claims and Drains, it is documented that even for uncommitted read (UR) isolation, there is a Claim Class of Cursor Stability Read taken. See the Claims and drains URLs below.

[{"Product":{"code":"SWG90","label":"z\/OS"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Not Applicable","Platform":[{"code":"","label":"MVS\/ESA"},{"code":"","label":"OS\/390"}],"Version":"1.8;1.9","Edition":"","Line of Business":{"code":"LOB56","label":"Z HW"}},{"Product":{"code":"SSEPEK","label":"Db2 for z\/OS"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":" ","Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"10.0;10.1;11.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
03 September 2021

UID

isg3T1020505