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

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