<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to know thw user that is locking a table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-know-thw-user-that-is-locking-a-table/m-p/470086#M120316</link>
    <description>&lt;P&gt;Hi, I would like to know if it is possible to know in SAS which person has locked a SAS table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible??&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance,&lt;/P&gt;</description>
    <pubDate>Wed, 13 Jun 2018 20:09:24 GMT</pubDate>
    <dc:creator>juanvg1972</dc:creator>
    <dc:date>2018-06-13T20:09:24Z</dc:date>
    <item>
      <title>How to know thw user that is locking a table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-know-thw-user-that-is-locking-a-table/m-p/470086#M120316</link>
      <description>&lt;P&gt;Hi, I would like to know if it is possible to know in SAS which person has locked a SAS table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible??&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance,&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 20:09:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-know-thw-user-that-is-locking-a-table/m-p/470086#M120316</guid>
      <dc:creator>juanvg1972</dc:creator>
      <dc:date>2018-06-13T20:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to know thw user that is locking a table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-know-thw-user-that-is-locking-a-table/m-p/470095#M120319</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/52605"&gt;@juanvg1972&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi, I would like to know if it is possible to know in SAS which person has locked a SAS table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible??&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance,&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I use the ps command to retrieve information about the process that has a file open. If you need to know all processes that have an active file handle on the file, use the fuser command.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 20:17:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-know-thw-user-that-is-locking-a-table/m-p/470095#M120319</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-06-13T20:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to know thw user that is locking a table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-know-thw-user-that-is-locking-a-table/m-p/470109#M120323</link>
      <description>&lt;P&gt;Hi Juan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; It will highly depend on your operating system. In Windows, you can use the Resource Monitor to search the "Associated Handles" this would give you the PID(s) that locks the file. You then use the task manager to find the user owning the culprit process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If UNIX/Linux, as Kurt pointed out, the fuser command will do it for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 20:38:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-know-thw-user-that-is-locking-a-table/m-p/470109#M120323</guid>
      <dc:creator>ybolduc</dc:creator>
      <dc:date>2018-06-13T20:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to know thw user that is locking a table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-know-thw-user-that-is-locking-a-table/m-p/470111#M120325</link>
      <description>&lt;P&gt;Base SAS don't have any functionality to know which user locked the dataset. You can know by running the operating system commands. Which operating system are you using?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 20:39:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-know-thw-user-that-is-locking-a-table/m-p/470111#M120325</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-06-13T20:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to know thw user that is locking a table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-know-thw-user-that-is-locking-a-table/m-p/470126#M120338</link>
      <description>&lt;P&gt;I am using&amp;nbsp;Unix.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you give an example of fuser command?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 21:07:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-know-thw-user-that-is-locking-a-table/m-p/470126#M120338</guid>
      <dc:creator>juanvg1972</dc:creator>
      <dc:date>2018-06-13T21:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to know thw user that is locking a table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-know-thw-user-that-is-locking-a-table/m-p/470165#M120352</link>
      <description>&lt;P&gt;Pretty straightforward: fuser [filename]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For more information, you can run the "man fuser" command on any UNIX/Linux box or refer to the following page: &lt;A href="http://man7.org/linux/man-pages/man1/fuser.1.html" target="_blank"&gt;http://man7.org/linux/man-pages/man1/fuser.1.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Luckily for you, on a UNIX/Linux environment, you can easily automate unlocking datasets thru shell scripting.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 01:49:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-know-thw-user-that-is-locking-a-table/m-p/470165#M120352</guid>
      <dc:creator>ybolduc</dc:creator>
      <dc:date>2018-06-14T01:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to know thw user that is locking a table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-know-thw-user-that-is-locking-a-table/m-p/470198#M120357</link>
      <description>&lt;P&gt;If your problem lies in updating a dataset that's opened by other users, I have created a macro that helps in this by using operating system commands to remove the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;UNIX has a different layout of filesystems than Windows:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;data space&lt;/LI&gt;
&lt;LI&gt;allocation table (shows used and free blocks)&lt;/LI&gt;
&lt;LI&gt;inode table (this is what Windows does not have)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Filenames in directories are just links to the inode table (in Windows the filename in the directory is a link to the allocation table); a physical file (represented by an inode that contains allocation information) can have several links pointing to the same inode. Removing such a link does not immediately remove the physical file. As long as an open file handle for the inode (not the filename!) exists, the file will keep on existing even when all links to it have been removed; only when the last file handle is closed will the inode be removed and the physical space be freed.&lt;/P&gt;
&lt;P&gt;This allows to "remove" an open file.&lt;/P&gt;
&lt;P&gt;My macro determines the physical filename from the library path and the dataset name, and issues a rm command. Other processes that have the file open will keep on "seeing" the old version until they close/reopen the dataset.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 05:55:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-know-thw-user-that-is-locking-a-table/m-p/470198#M120357</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-06-14T05:55:14Z</dc:date>
    </item>
  </channel>
</rss>

