BookmarkSubscribeRSS Feed
Lobstermaster
Calcite | Level 5
Hi, I use DI Studio to build jobs and run data loads. From time to time, I get error messages about the data set is locked by another process and preventing my jobs to update the data set.

My questions are,
1. Is there a way e.g. in the table loader transformation to have exclusive rights or lock over the data set so that I can load the data like in Teradata, there is a row access locking statement to implement?

2. If I create/load a table as a view in DI using a source data set and if some one is using the view, will it prevent me from updating the source data set?

Thanks,
Lobbie
3 REPLIES 3
Patrick
Opal | Level 21
Hi

1. As much as I know concurrent read/write of Base SAS tables is only possible when using SAS/Share.

2. Terminology: If you're updating a table in DI then is this a target table (and not a source table). A view can be seen as encapsulated code. So if someone is executing this view then the table(s) accessed by this view get read and you can't write concurrently.

And last but not least:
I hope you're only using DIS to build jobs. For execution (other than unit testing) you should deploy the jobs and run them in batch (or eventually via EG if it has to be).

What you possibly could try:
Run your update jobs in an overnight process in batch.
Have policies and procedures in place that there is a time during the night where users are not allowed to access your data (eventually also by nightly restarting SAS servers or via script killing all SAS processes which access a table after a certain hour - i.e. all this "left-open" EG sessions).

HTH
Patrick
RMP
SAS Employee RMP
SAS Employee
"Have policies and procedures in place that there is a time during the night where users are not allowed to access your data (eventually also by nightly restarting SAS servers or via script killing all SAS processes which access a table after a certain hour - i.e. all this "left-open" EG sessions)."

This last point is very important. Before your batch runs ensure that all sessions are killed. Many users open datasets in a session and leave for the day without closing Eguide. Very frustrating.
Lobstermaster
Calcite | Level 5
Hi Patrick and RMP,

thanks for your advice. Will look into this.

Regards,
Lobbie

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1505 views
  • 0 likes
  • 3 in conversation