BookmarkSubscribeRSS Feed
kwyland1
Fluorite | Level 6

When we run SQL queries from any sql editor against our mainframe db2 tables, we are asked to use the with UR.  Note: We only are allowed 'read-only' access to this database. 

 

Q. I'm not totally familiar with the isolation methods, but wondering if 'with UR' can be used in Proc SQL.  

Q. If syntax not allowed, how does SAS handle that method?

5 REPLIES 5
PaigeMiller
Diamond | Level 26

Just so I can follow along, what is “UR”?

--
Paige Miller
Kurt_Bremser
Super User

"UR" is for Unblocking Read, which means the database can still be updated while the query is in progress.

 

I suggest to use explicit passthrough, where WITH UR is possible.

Tom
Super User Tom
Super User

You can always use pass-thru SQL to run code that uses system dependent syntax changes.

 

Having to add extra non-standard clauses to every query you write sounds like a difficult way to work. I would hope there would be some way to change a setting so that unrestricted read is the default behavior for your session.  But you will have to ask your DB2 experts as that is NOT standard SQL syntax.

 

If they are worried you are impacting their operational data perhaps they can give you access to readonly views or a daily dump of the data to work from to isolate their production system from the loads required for reporting needs.

 

 

s_lassen
Meteorite | Level 14

In the good old days, you could speed up a DB2 query quite a lot by adding "for fetch only" at the end of your query, telling DB2 that you did not want to update anything.

 

May still be the way to go, it does not hurt to try...

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1938 views
  • 3 likes
  • 6 in conversation