BookmarkSubscribeRSS Feed
kiranv_
Rhodochrosite | Level 12

We have SAS datasets, which many people have access to read and write. Many a times people click those tables and open. Table gets locked. To circumvent this problem, I tried to created views in same library, if people double click the view it opens table and locks the table. 

 

One solution I am thinking of to create view in new library with access=read only option.

 

Is there read only view option, where in someone double clicks and table does not lock the table. is it possible to do in same library. 

 

Please let me know if something is not clear.

3 REPLIES 3
LinusH
Tourmaline | Level 20
Is it only the exclusive lock you are worrying about?
So they need write access at all?
Also, describe your environment (SAS clients, any server, metadata server etc).
Data never sleeps
kiranv_
Rhodochrosite | Level 12

yes exclusive lock is what I am worried about. It is windows environment without SAS/Share .

Patrick
Opal | Level 21

If your users only need to consume the data but don't need write access then it's certainly a good idea to define the library with access=readonly. This should avoid any locking issues whether that's now using a view or accessing the table directly.

 

Accessing the table with readonly will still lock the table for write access (i.e. for a batch job updating the table). There is not much you can do about this except for having your write job run overnight and eventually restart the object spawner first (so all EG and SAS Studio sessions will be forced to release their lock). You could also look into option FILELOCKWAIT. This is not a 100% solution but it will eventually help you to circumvent the most common locking issues.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1337 views
  • 0 likes
  • 3 in conversation