Unlocking tables

Reply
Occasional Contributor
Posts: 8

Unlocking tables

We are looking for a script that can unlock a table or can kill a user session? Does anyone knows something?.

Super User
Super User
Posts: 7,968

Re: Unlocking tables

Posted in reply to DatanaliticaSAS

The problem with that is why?  If a file is locked, or a user has something open then they could be writing to the data.  If you then force delete whilst that is happening then your going to corrupt the data. If you need to do work without other users accessing, setup a maintenance time, and lock out users from opening sessions for that time period so your clear that no-one is accessing the data.  AS for how you lock out users, or arrange this downtime, that is up to a) your install, i.e. what products, b) where the products are located, c) company policy etc.

Occasional Contributor
Posts: 8

Re: Unlocking tables

Posted in reply to DatanaliticaSAS

Sorry I didn't make the question correctly, you know that in unix or windows we can kill user sessions and in databases like oracle too, what we want to know is if we can do it in sas?

Respected Advisor
Posts: 3,156

Re: Unlocking tables

Posted in reply to DatanaliticaSAS

You can't. You will have to resort to OS to kill a user session, and for Windows, it is not always reliable. Back to you original problem, have you looked into SAS/SHARE, which seems to fit the bill.

Super User
Super User
Posts: 7,968

Re: Unlocking tables

Posted in reply to DatanaliticaSAS

Its gets worse, you want to kill of database sessions as well?  Your database administrator should be taking care of the database.  Whilst DB's are quite robust, if you corrupt a main table there your going to have hours of fun rebuilding it.  There are reasons why "downtime" is decided up front, by systems administrators.

Ask a Question
Discussion stats
  • 4 replies
  • 303 views
  • 0 likes
  • 3 in conversation