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?
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.
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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.