<?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 Re: SAS ERROR: A lock is not available for XXXX.XXXX_SSN.DATA in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-ERROR-A-lock-is-not-available-for-XXXX-XXXX-SSN-DATA/m-p/648134#M194083</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/325150"&gt;@KAS25&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;The table is being created as for as in SAS for that datamart.&amp;nbsp; The .DATA I'm thinking but not sure that this is a file accessed from the RDBMS and at the point in time it's trying to be accessed SAS is trying to take a lock.&amp;nbsp; Although I know access=readonly, but my not be holding through the entire script.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I can't figure out what you are tying to say here.&amp;nbsp; If the libref is pointing to a remote database then you cannot use the PROC SQL index command to create an index in that remote database.&amp;nbsp; Do you even need to create the index?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 15 May 2020 19:16:04 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2020-05-15T19:16:04Z</dc:date>
    <item>
      <title>SAS ERROR: A lock is not available for XXXX.XXXX_SSN.DATA</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-ERROR-A-lock-is-not-available-for-XXXX-XXXX-SSN-DATA/m-p/647904#M193937</link>
      <description>&lt;P&gt;User receiving&amp;nbsp;ERROR: A lock is not available for XXXX.XXXX_SSN.DATA&lt;/P&gt;&lt;P&gt;&amp;nbsp; and&amp;nbsp;ERROR: A lock is not available for XXXX.XXXX_SSN.INDEX&lt;/P&gt;&lt;P&gt;The table is created user says everything is not complete.&amp;nbsp; I Thought the below was implying that some else has a lock on the entity.&amp;nbsp; Just trying to get an idea of what to check or verify...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;NOTE: SAS threaded sort was used.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;NOTE: Table PXXXX.XXXX_SSN created, with 645293 rows and 2 columns.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;98&amp;nbsp; +&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;99&amp;nbsp; +&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 14:05.97&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; user cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6.25 seconds&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.09 seconds&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; memory&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 269208.58k&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OS Memory&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 279004.00k&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Timestamp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;05/04/2020 04:37:46 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Step Count&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp; Switch Count&amp;nbsp; 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;100 +Proc SQL;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;101 +create Index ssn on pcxxx.xxxt_ssn(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;102 +&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ssn&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;103 +);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;ERROR: A lock is not available for PXXX.XXXX_SSN.DATA.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;104 +&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;105 +quit;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;I&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 May 2020 18:54:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-ERROR-A-lock-is-not-available-for-XXXX-XXXX-SSN-DATA/m-p/647904#M193937</guid>
      <dc:creator>KAS25</dc:creator>
      <dc:date>2020-05-14T18:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: SAS ERROR: A lock is not available for XXXX.XXXX_SSN.DATA</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-ERROR-A-lock-is-not-available-for-XXXX-XXXX-SSN-DATA/m-p/647921#M193942</link>
      <description>The  most common cause is that you are viewing the table in another window.   You may also also be looking at a view that includes the table.   Since you are probably replacing the entire table, then the open table would be wrong.   The trickiest cause is that you has a SAS session (Enterprise Guide, Studio)  that has the table open and then your client loses the connection, so that you have a zombie SAS task running on the server.   These inactive sessions would normally get cleaned up automatically, so maybe simply waiting may solve your problem</description>
      <pubDate>Thu, 14 May 2020 21:14:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-ERROR-A-lock-is-not-available-for-XXXX-XXXX-SSN-DATA/m-p/647921#M193942</guid>
      <dc:creator>DavePrinsloo</dc:creator>
      <dc:date>2020-05-14T21:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: SAS ERROR: A lock is not available for XXXX.XXXX_SSN.DATA</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-ERROR-A-lock-is-not-available-for-XXXX-XXXX-SSN-DATA/m-p/647930#M193946</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/325150"&gt;@KAS25&lt;/a&gt;&amp;nbsp; - If I'm following your evidence correctly you are successfully creating a SAS table but then trying to add an index to it in the SQL step that follows. If that is the case, then possibly cached or "lazy" writes to disk might be the problem. How about getting the user to manually run the table creation step, wait for a minute, then manually run the index step. If this works, then my theory about the lazy writes might be true.&lt;/P&gt;</description>
      <pubDate>Thu, 14 May 2020 21:51:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-ERROR-A-lock-is-not-available-for-XXXX-XXXX-SSN-DATA/m-p/647930#M193946</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-05-14T21:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAS ERROR: A lock is not available for XXXX.XXXX_SSN.DATA</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-ERROR-A-lock-is-not-available-for-XXXX-XXXX-SSN-DATA/m-p/647967#M193978</link>
      <description>&lt;P&gt;Wait, you have 10&amp;nbsp;&lt;STRONG&gt;seconds&lt;/STRONG&gt; of CPU time, but 14&amp;nbsp;&lt;STRONG&gt;minutes&lt;/STRONG&gt; real time creating the dataset? Either that SQL is written in a most inefficient way, or there are other factors involved.&lt;/P&gt;
&lt;P&gt;Does the target library "XXXX" point to a RDBMS, or storage on a network share?&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 05:19:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-ERROR-A-lock-is-not-available-for-XXXX-XXXX-SSN-DATA/m-p/647967#M193978</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-05-15T05:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: SAS ERROR: A lock is not available for XXXX.XXXX_SSN.DATA</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-ERROR-A-lock-is-not-available-for-XXXX-XXXX-SSN-DATA/m-p/648109#M194071</link>
      <description>&lt;P&gt;&lt;BR /&gt;--Does the target library "XXXX" point to a RDBMS, or storage on a network share?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes pulling information from a RDBMS. &amp;nbsp; I just wondering why all of a sudden this is an issue?&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 17:36:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-ERROR-A-lock-is-not-available-for-XXXX-XXXX-SSN-DATA/m-p/648109#M194071</guid>
      <dc:creator>KAS25</dc:creator>
      <dc:date>2020-05-15T17:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: SAS ERROR: A lock is not available for XXXX.XXXX_SSN.DATA</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-ERROR-A-lock-is-not-available-for-XXXX-XXXX-SSN-DATA/m-p/648115#M194075</link>
      <description>&lt;P&gt;Database systems are complex and do a lot of not-so-obvious things in the background like automatic indexing or checking the integrity rules.&lt;/P&gt;
&lt;P&gt;So even if your transfer is through, there still might be some "cleanup" going on which prevents another operation on the table. I suggest adding a "wait" step before the sort.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 17:44:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-ERROR-A-lock-is-not-available-for-XXXX-XXXX-SSN-DATA/m-p/648115#M194075</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-05-15T17:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: SAS ERROR: A lock is not available for XXXX.XXXX_SSN.DATA</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-ERROR-A-lock-is-not-available-for-XXXX-XXXX-SSN-DATA/m-p/648124#M194080</link>
      <description>&lt;P&gt;Is there a reason the two steps are using similarly named datasets in two different libraries?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;NOTE: Table &lt;FONT color="#FF0000"&gt;PXXXX&lt;/FONT&gt;.XXXX_SSN created, with 645293 rows and 2 columns.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;ERROR: A lock is not available for &lt;FONT color="#FF0000"&gt;PXXX&lt;/FONT&gt;.XXXX_SSN.DATA.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Or is that just a result of you editing the log text to obscure the libref and/or member name?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 18:11:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-ERROR-A-lock-is-not-available-for-XXXX-XXXX-SSN-DATA/m-p/648124#M194080</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-05-15T18:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: SAS ERROR: A lock is not available for XXXX.XXXX_SSN.DATA</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-ERROR-A-lock-is-not-available-for-XXXX-XXXX-SSN-DATA/m-p/648130#M194082</link>
      <description>&lt;P&gt;The table is being created as for as in SAS for that datamart.&amp;nbsp; The .DATA I'm thinking but not sure that this is a file accessed from the RDBMS and at the point in time it's trying to be accessed SAS is trying to take a lock.&amp;nbsp; Although I know access=readonly, but my not be holding through the entire script.&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 19:04:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-ERROR-A-lock-is-not-available-for-XXXX-XXXX-SSN-DATA/m-p/648130#M194082</guid>
      <dc:creator>KAS25</dc:creator>
      <dc:date>2020-05-15T19:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: SAS ERROR: A lock is not available for XXXX.XXXX_SSN.DATA</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-ERROR-A-lock-is-not-available-for-XXXX-XXXX-SSN-DATA/m-p/648134#M194083</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/325150"&gt;@KAS25&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;The table is being created as for as in SAS for that datamart.&amp;nbsp; The .DATA I'm thinking but not sure that this is a file accessed from the RDBMS and at the point in time it's trying to be accessed SAS is trying to take a lock.&amp;nbsp; Although I know access=readonly, but my not be holding through the entire script.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I can't figure out what you are tying to say here.&amp;nbsp; If the libref is pointing to a remote database then you cannot use the PROC SQL index command to create an index in that remote database.&amp;nbsp; Do you even need to create the index?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 19:16:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-ERROR-A-lock-is-not-available-for-XXXX-XXXX-SSN-DATA/m-p/648134#M194083</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-05-15T19:16:04Z</dc:date>
    </item>
  </channel>
</rss>

