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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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