<?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: Reading SQL Server Tables into SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reading-SQL-Server-Tables-into-SAS/m-p/409727#M279566</link>
    <description>&lt;P&gt;What is the physical size of the resulting SAS table? From that, you can deduce the overall transfer rate. Check if any other data transfer to/from the SQL server is equally slow; if yes, the network connection is your problem.&lt;/P&gt;</description>
    <pubDate>Thu, 02 Nov 2017 08:12:25 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-11-02T08:12:25Z</dc:date>
    <item>
      <title>Reading SQL Server Tables into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-SQL-Server-Tables-into-SAS/m-p/409724#M279565</link>
      <description>&lt;P&gt;Good day&lt;/P&gt;&lt;P&gt;I use SQL passthru to create a temp table (the result of a number of temp tables and then finally joining to create the final temp table) in SQL Server. The resulting table has 6 columns and around 8.7m rows. I need to copy that into a sAS dataset, and I opted to use this method:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;connect to SQLSVR (CONNECTION=GLOBAL DATAsrc=&amp;amp;DATASRC_EXT. USER=&amp;amp;SM_USER. PASSWORD=&amp;amp;SM_PASS.);&lt;BR /&gt;create table final_location as select * from connection to sqlsvr (select * from #Final_Location);&lt;BR /&gt;disconnect from sqlsvr;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BUT it takes 2 hours! Is there an alternative method that would reduce the runtime?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2017 08:02:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-SQL-Server-Tables-into-SAS/m-p/409724#M279565</guid>
      <dc:creator>HeidiDT</dc:creator>
      <dc:date>2017-11-02T08:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Reading SQL Server Tables into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-SQL-Server-Tables-into-SAS/m-p/409727#M279566</link>
      <description>&lt;P&gt;What is the physical size of the resulting SAS table? From that, you can deduce the overall transfer rate. Check if any other data transfer to/from the SQL server is equally slow; if yes, the network connection is your problem.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2017 08:12:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-SQL-Server-Tables-into-SAS/m-p/409727#M279566</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-11-02T08:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: Reading SQL Server Tables into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-SQL-Server-Tables-into-SAS/m-p/409728#M279567</link>
      <description>&lt;P&gt;Also consider setting a libname for your SQL Server database and use that. Hints for tuning ACCESS libraries can be found here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/bidsag/61236/HTML/default/viewer.htm#a002668484.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/bidsag/61236/HTML/default/viewer.htm#a002668484.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2017 08:15:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-SQL-Server-Tables-into-SAS/m-p/409728#M279567</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-11-02T08:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Reading SQL Server Tables into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-SQL-Server-Tables-into-SAS/m-p/409759#M279568</link>
      <description>&lt;P&gt;Thanks! Adding READBUFF= reduced the time to 1 1/2 hours. But in another SAS job I also copy data from SQL server to a SAS dataset, same amount of rows but WAY more columns, and that copy only takes around 15 minutes. Could the fact that the first table is a temporary table make a difference?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2017 10:46:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-SQL-Server-Tables-into-SAS/m-p/409759#M279568</guid>
      <dc:creator>HeidiDT</dc:creator>
      <dc:date>2017-11-02T10:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Reading SQL Server Tables into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-SQL-Server-Tables-into-SAS/m-p/409776#M279569</link>
      <description>&lt;P&gt;I wouldn't look so much at the number of columns, but at the record/observation size. One long string variable easily outweighs 10 or 20 numbers.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2017 11:14:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-SQL-Server-Tables-into-SAS/m-p/409776#M279569</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-11-02T11:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: Reading SQL Server Tables into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-SQL-Server-Tables-into-SAS/m-p/409780#M279570</link>
      <description>&lt;P&gt;The table that takes longer to copy has only 1 character variable (19 charactes) and 5 numeric variables. The one that copies in 15 minutes has 217 variables, of which 26 are character variables.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2017 11:21:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-SQL-Server-Tables-into-SAS/m-p/409780#M279570</guid>
      <dc:creator>HeidiDT</dc:creator>
      <dc:date>2017-11-02T11:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: Reading SQL Server Tables into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-SQL-Server-Tables-into-SAS/m-p/409785#M279571</link>
      <description>&lt;P&gt;Then next I'd run the query in SQL Server only (from your DB client on the SAS machine), to see if the bad performance happens there. And consult with your DBA's. It might be that they mutter "oh, my", adjust some settings, and Bob's your uncle.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2017 11:29:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-SQL-Server-Tables-into-SAS/m-p/409785#M279571</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-11-02T11:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: Reading SQL Server Tables into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-SQL-Server-Tables-into-SAS/m-p/410118#M279572</link>
      <description>&lt;P&gt;One reason why the other query (from a larger, permanent table) goes faster can be that the permanent table is partitioned. In that case, SAS SQL can extract each partition in parallel, making the transfer go faster.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 08:45:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-SQL-Server-Tables-into-SAS/m-p/410118#M279572</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2017-11-03T08:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Reading SQL Server Tables into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-SQL-Server-Tables-into-SAS/m-p/410120#M279573</link>
      <description>&lt;P&gt;I just remembered that the permanent "table" is in actual fact a view!&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 08:50:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-SQL-Server-Tables-into-SAS/m-p/410120#M279573</guid>
      <dc:creator>HeidiDT</dc:creator>
      <dc:date>2017-11-03T08:50:15Z</dc:date>
    </item>
  </channel>
</rss>

