<?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 Connection to the ODBC Server - Locks the Database in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Connection-to-the-ODBC-Server-Locks-the-Database/m-p/567269#M159504</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/238046"&gt;@SNG1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try your program while not viewing data in the grid.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best wishes,&lt;/P&gt;
&lt;P&gt;Jeff&lt;/P&gt;</description>
    <pubDate>Wed, 19 Jun 2019 13:44:00 GMT</pubDate>
    <dc:creator>JBailey</dc:creator>
    <dc:date>2019-06-19T13:44:00Z</dc:date>
    <item>
      <title>SAS Connection to the ODBC Server - Locks the Database</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Connection-to-the-ODBC-Server-Locks-the-Database/m-p/566560#M159249</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using SAS EG 7.1 (32 bit), I am connecting to a SQL Server via ODBC Data Source Administrator (using the SQL Server Driver).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the above I run into issues where when I run a Program, it locks the entire DB I am connecting to...I do use a NOLOCK option in my library statement&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i.e. READ_LOCK_TYPE = nolock;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even with this statement I sometimes end up locking the entire DB, is there something that I am missing? Is there a statement that I need to add in the Program itself to prevent this from happening?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for all your Help&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 13:25:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Connection-to-the-ODBC-Server-Locks-the-Database/m-p/566560#M159249</guid>
      <dc:creator>SNG1</dc:creator>
      <dc:date>2019-06-17T13:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Connection to the ODBC Server - Locks the Database</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Connection-to-the-ODBC-Server-Locks-the-Database/m-p/567233#M159490</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anybody has any solution for these? Much Appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 12:47:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Connection-to-the-ODBC-Server-Locks-the-Database/m-p/567233#M159490</guid>
      <dc:creator>SNG1</dc:creator>
      <dc:date>2019-06-19T12:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Connection to the ODBC Server - Locks the Database</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Connection-to-the-ODBC-Server-Locks-the-Database/m-p/567252#M159495</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/238046"&gt;@SNG1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you say "entire DB" do you mean the table(s) you are dealing with or the entire MS SQL Server database?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best wishes,&lt;/P&gt;
&lt;P&gt;Jeff&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 13:13:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Connection-to-the-ODBC-Server-Locks-the-Database/m-p/567252#M159495</guid>
      <dc:creator>JBailey</dc:creator>
      <dc:date>2019-06-19T13:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Connection to the ODBC Server - Locks the Database</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Connection-to-the-ODBC-Server-Locks-the-Database/m-p/567253#M159496</link>
      <description>&lt;P&gt;My Apologies, its the table that I am connecting to that gets locked.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 13:16:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Connection-to-the-ODBC-Server-Locks-the-Database/m-p/567253#M159496</guid>
      <dc:creator>SNG1</dc:creator>
      <dc:date>2019-06-19T13:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Connection to the ODBC Server - Locks the Database</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Connection-to-the-ODBC-Server-Locks-the-Database/m-p/567256#M159497</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/238046"&gt;@SNG1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's good. Can you share the code that you are running?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best wishes,&lt;/P&gt;
&lt;P&gt;Jeff&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 13:20:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Connection-to-the-ODBC-Server-Locks-the-Database/m-p/567256#M159497</guid>
      <dc:creator>JBailey</dc:creator>
      <dc:date>2019-06-19T13:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Connection to the ODBC Server - Locks the Database</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Connection-to-the-ODBC-Server-Locks-the-Database/m-p/567259#M159499</link>
      <description>&lt;P&gt;Thanks for the Quick Reply:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following in THE LIBRARY Statement -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname wc13b odbc dsn='wc13b' readbuff=3000 insertbuff=3000 dbcommit=3000 READ_LOCK_TYPE=NOLOCK;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also tried it with -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname wc13b odbc dsn='wc13b'&amp;nbsp; READ_LOCK_TYPE=NOLOCK;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My program to the pull the data is very simple -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc Sql;&lt;BR /&gt;create table SASUSER.clients_B&lt;BR /&gt;as&lt;BR /&gt;select distinct&lt;BR /&gt;Power_ID,&lt;BR /&gt;input(compress(phonecell),10.) as Cell_Phone,&lt;BR /&gt;LSTNAME,&lt;BR /&gt;FIRSTNAME,&lt;BR /&gt;input(HAREA, 10.) as HAREA,&lt;BR /&gt;input(HPHONE, 10.) as HPHONE,&lt;BR /&gt;input(catx('',HAREA, HPHONE),10.) AS Home_Phone&lt;/P&gt;&lt;P&gt;from wc13.clients&lt;BR /&gt;;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The clients table gets locked&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 13:24:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Connection-to-the-ODBC-Server-Locks-the-Database/m-p/567259#M159499</guid>
      <dc:creator>SNG1</dc:creator>
      <dc:date>2019-06-19T13:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Connection to the ODBC Server - Locks the Database</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Connection-to-the-ODBC-Server-Locks-the-Database/m-p/567262#M159501</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/238046"&gt;@SNG1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which version of SAS are you using?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you viewing the table in an EG data grid (not sure exactly what it is called) while you are running this code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best wishes,&lt;/P&gt;
&lt;P&gt;Jeff&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 13:34:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Connection-to-the-ODBC-Server-Locks-the-Database/m-p/567262#M159501</guid>
      <dc:creator>JBailey</dc:creator>
      <dc:date>2019-06-19T13:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Connection to the ODBC Server - Locks the Database</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Connection-to-the-ODBC-Server-Locks-the-Database/m-p/567263#M159502</link>
      <description>&lt;P&gt;Its SAS Enterprise GUIDE 7.1 and I am viewing the data in the EG Grid.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 13:37:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Connection-to-the-ODBC-Server-Locks-the-Database/m-p/567263#M159502</guid>
      <dc:creator>SNG1</dc:creator>
      <dc:date>2019-06-19T13:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Connection to the ODBC Server - Locks the Database</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Connection-to-the-ODBC-Server-Locks-the-Database/m-p/567267#M159503</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/238046"&gt;@SNG1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am looking for something like SAS 9.4M6 for the version of SAS that you are connecting to.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best wishes,&lt;/P&gt;
&lt;P&gt;Jeff&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 13:41:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Connection-to-the-ODBC-Server-Locks-the-Database/m-p/567267#M159503</guid>
      <dc:creator>JBailey</dc:creator>
      <dc:date>2019-06-19T13:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Connection to the ODBC Server - Locks the Database</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Connection-to-the-ODBC-Server-Locks-the-Database/m-p/567269#M159504</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/238046"&gt;@SNG1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try your program while not viewing data in the grid.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best wishes,&lt;/P&gt;
&lt;P&gt;Jeff&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 13:44:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Connection-to-the-ODBC-Server-Locks-the-Database/m-p/567269#M159504</guid>
      <dc:creator>JBailey</dc:creator>
      <dc:date>2019-06-19T13:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Connection to the ODBC Server - Locks the Database</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Connection-to-the-ODBC-Server-Locks-the-Database/m-p/567274#M159507</link>
      <description>&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the version Is SAS i see if SAS 9.4&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 13:50:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Connection-to-the-ODBC-Server-Locks-the-Database/m-p/567274#M159507</guid>
      <dc:creator>SNG1</dc:creator>
      <dc:date>2019-06-19T13:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Connection to the ODBC Server - Locks the Database</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Connection-to-the-ODBC-Server-Locks-the-Database/m-p/567283#M159509</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/238046" target="_blank" rel="noopener"&gt;@SNG1&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try your program while not viewing data in the grid. This should stop the locking issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have researched this problem. Opening a table in the Data Grid creates a READ lock on the table. According to the developers, it "is a SAS thing, and not an EG thing." I am currently trying to find out what this means. I am looking into this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are some things that may help, but probably won't:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Using SAS/SHARE can reduce the locking to record-level (I know, this is a non-solution).&lt;/LI&gt;
&lt;LI&gt;Enterprise Guide 8.1 holds the lock for a much shorter time (3 minutes of inactivity, can be set to a minimum of 1 minute). Previous releases of EG close the data grid after 30 minutes.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best wishes,&lt;/P&gt;
&lt;P&gt;Jeff&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2019 19:51:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Connection-to-the-ODBC-Server-Locks-the-Database/m-p/567283#M159509</guid>
      <dc:creator>JBailey</dc:creator>
      <dc:date>2019-07-25T19:51:33Z</dc:date>
    </item>
  </channel>
</rss>

