Desktop productivity for business analysts and programmers

Timeout for locks on objects in SAS EG

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

Timeout for locks on objects in SAS EG

Hi! 

 

How can i set timeout for locks on objects (for example: tables) in EG.

 

My case: i opened a table from some library in EG, now i see the content of the table. Then i do nothing and see, that this table close about 40-50 minutes and lock on this object no longer exists. If i try to re-write this object from another session, when this table open in my current session - i have an error:

 

a lock is not available for MY.TABLE. 

Lock held by proccess ****.

 

I need to know, on which parametres depends the time of blocking on the object?

 

Thanks! 

 

P.S. Sorry for my English)


Accepted Solutions
Solution
‎09-12-2017 05:14 AM
Respected Advisor
Posts: 4,557

Re: Timeout for locks on objects in SAS EG

@HULK

In EG set the setting to something below 10 minutes.

 

Capture.JPG

 

 

 

 

In your code use:

 

options filelockwait=10;

 

This way your first EG session should release a table after less than 10 minutes but the code in your 2nd EG project will wait for up to 10 minutes for a lock on the table to be released before it fails.

 

 

View solution in original post


All Replies
Regular Contributor
Posts: 213

Re: Timeout for locks on objects in SAS EG

If you close the table, the lock should disappear. If you're in EG, you can go to Tools >> View Open Data Sets... and see if it's still open.

 

The only other thing I could find that might be useful is this knowledge base article talking about how you can set and wait for locks.

Regular Contributor
Posts: 213

Re: Timeout for locks on objects in SAS EG

Posted in reply to paulkaefer

To add to my post, this paper dives into locks.

Super Contributor
Posts: 292

Re: Timeout for locks on objects in SAS EG

Not sure if it will help, but have a look at this setting in Enterprise Guide: Tools >> Options >> Data >> Performance >> Close data grid....
Solution
‎09-12-2017 05:14 AM
Respected Advisor
Posts: 4,557

Re: Timeout for locks on objects in SAS EG

@HULK

In EG set the setting to something below 10 minutes.

 

Capture.JPG

 

 

 

 

In your code use:

 

options filelockwait=10;

 

This way your first EG session should release a table after less than 10 minutes but the code in your 2nd EG project will wait for up to 10 minutes for a lock on the table to be released before it fails.

 

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 274 views
  • 0 likes
  • 4 in conversation