BookmarkSubscribeRSS Feed
ksuman
Obsidian | Level 7

Hi,

When the flow status EXIT in LSF when i checked the log file I'm getting the message 'Table lock' used by another user....What does it mean and is there any solution for this ?

Thanks,

Suman

13 REPLIES 13
twocanbazza
Quartz | Level 8

Hey

Without looking into this too much, it means another process is accessing the table you are trying to access.

Are there anyother processes running in LSF at the same time, any users using EG etc.  There are tools out there that will show you what is locking a particular file.

Cheers

Barry

ksuman
Obsidian | Level 7

Thanks for the reply, Can you tell me the Tool names please

Users are not closing the session properly it could be a SAS EG, or SAS DI or any Client Tire tools. that's why when we ran the LSF we are facing Table lock errors, How do we take this ?

Thanks,

Suman

SatishKumar
Calcite | Level 5

hi

most of our sas users complaint the same , as they want to open tables at any time though the ETL jobs are running , we plan of using lock proc . But i want to know other option out of this   which make sas users do there read dataset and ETL jobs do their update dataset

TomKari
Onyx | Level 15

Usually this is what database technology is used for. There are some analytics oriented database out there that are optimized for many readers / one writer. Alternatively, SAS/Share might be an option, although I haven't used it.

Aside from those, I know that many SAS users have developed home-grown synchronization processes over the years...maybe a search of SGF papers would pop some up.

Tom

twocanbazza
Quartz | Level 8

If you are using Windows you can see who is locking the tables with - start -> Administrative tools ->Share and Storage management


ksuman
Obsidian | Level 7
yoanbolduc
Calcite | Level 5

Hi ksuman,

     As everybody mentionned, this is very typical of a multi-user SAS environment. The idea that Tom proposed of using a database engine would probably be the best approach. The Base SAS engine is a very poor choice for multi-user environment as it relies on the operating system file locking mechanism.

     If you want to keep using the Base SAS engine, you can use the fuser command on any UNIX-like operating system to list active locks on a file. It is easy to build a small script that will kill the locking processes but this is a very drastic approach.

I hope this helps a little,

Yoan

AvinashGinjupalli
Calcite | Level 5

As said by

SASKiwi
PROC Star

One brute force solution to the SAS table locking problem is to bounce your SAS workspace server(s) just prior to running your ETL jobs. This works well if your ETL jobs are run overnight in batch. Often it is good practice to restart your SAS servers on a regular basis anyway just to get rid of any orphan server processes and to do backups etc.

Of course this approach is not useful if ETL jobs have to run at the same time as user jobs....Smiley Wink

AvinashGinjupalli
Calcite | Level 5

Even we have a cleanwork utility in SAS which we can use for cleaning the workarea, all we need to do is chaning the paramters in it acooridng to your environment and schedule it to run for every 2 hours, this will clean the work area relase some of the files.

ksuman
Obsidian | Level 7

Thanks Avinash,

Can you please brief me about 'clean work utility in SAS'....

Thanks,

Suman

AvinashGinjupalli
Calcite | Level 5

Suman,

cleanwork is a script which will be provided by SAS used for cleaning the temp work files, it will be available under SASHOME/SASFoundation/version(9.3/9.2)/utilities/bin on server.

All you need to do is execute the above script againist your SAS Work area.

Example:

/sas/bau/saswork is your work area where temp files will get created, you need to execute the above script againist this filesystem as shown below:

Go to the location where cleanwork available and execute it against work area: ./cleanwork /sas/bau/saswork

For locating cleanwork you can give locate cleanwork on your LINUX/UNIX server.

Thanks,

Avinash Ginjupalli.

ksuman
Obsidian | Level 7

Thanks Avinash  Smiley Happy

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 13 replies
  • 4560 views
  • 5 likes
  • 7 in conversation