BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
MarkParent
Calcite | Level 5

I'm converting SAS code with PROC SQL statements where the back end is moving from DB2 to Oracle.  My Base SAS is 9.4

 

The existing DB2 statements use FOR FETCH ONLY WITH UR, which I understand allows this code to avoid record locks with other users and potentially accepts some "out of date" data when accessing records which others may be simultaneously updating.

 

In the Oracle environment will the LIBNAME option READ_LOCK_TYPE=NOLOCK provide the equivalent locking control?

1 ACCEPTED SOLUTION

Accepted Solutions
JonLaurent
Calcite | Level 5

FOR FETCH ONLY WITH UR is IBM DB2-code for fetching uncommited changes from other sessions.

 

FOR FETCH ONLY - means the cursor is read only, issues different types of locks and does not allow for update. 
WITH UR - means instead of retrieving only committed work, your SELECT or FETCH will also retrieve rows that have not been committed by other tasks.

 

 

This sort of "Dirty reads" is not allowed in Oracle.

 

View solution in original post

1 REPLY 1
JonLaurent
Calcite | Level 5

FOR FETCH ONLY WITH UR is IBM DB2-code for fetching uncommited changes from other sessions.

 

FOR FETCH ONLY - means the cursor is read only, issues different types of locks and does not allow for update. 
WITH UR - means instead of retrieving only committed work, your SELECT or FETCH will also retrieve rows that have not been committed by other tasks.

 

 

This sort of "Dirty reads" is not allowed in Oracle.

 

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
  • 1 reply
  • 2044 views
  • 0 likes
  • 2 in conversation