<?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: Posting large dataset to SQL table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Posting-large-dataset-to-SQL-table/m-p/690207#M209955</link>
    <description>Hi Chris,&lt;BR /&gt;The table takes to long to load into SQL. Run time is about 5 hours.&lt;BR /&gt;&lt;BR /&gt;I'm using SAS/ACESS interface with ODBC.&lt;BR /&gt;&lt;BR /&gt;Thank you!</description>
    <pubDate>Thu, 08 Oct 2020 21:42:35 GMT</pubDate>
    <dc:creator>SAShole</dc:creator>
    <dc:date>2020-10-08T21:42:35Z</dc:date>
    <item>
      <title>Posting large dataset to SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Posting-large-dataset-to-SQL-table/m-p/690177#M209930</link>
      <description>&lt;P&gt;I'm trying to create a table in a SQL database using proc SQL. My dataset is 200K records and has twenty variables. However, some of them are free text variables and have huge informats like $3000 -- So my final file ends up being about 2GB. I don't have any meta information on the source file so I'm not able to say if I can save space anywhere. The problem is that the table takes too long to load, about 5 hours run time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Am I able to adjust the &lt;A href="https://www.red-gate.com/simple-talk/sql/database-administration/sql-server-database-growth-and-autogrowth-settings/" target="_self"&gt;auto-growth&lt;/A&gt;? Or check what the default is?&lt;/P&gt;
&lt;P&gt;Would the explicit SQL pass-thru be any help?&lt;/P&gt;
&lt;P&gt;Also, not helping things is the SAS Server is in the EU and SQL Server is in the US.&lt;/P&gt;
&lt;P&gt;I haven't tried adding these options but maybe they would help:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options compress=yes sastrace=',,,d' sastracelog=log notsuffix;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My code looks like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;libname DB odbc noprompt="driver=XXX server=XXX database=XXX";&lt;BR /&gt;&lt;BR /&gt;proc sql;
          create table DB.BigTable;
          as select *
          from work.BigDataSet;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Edited post to include information from&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp; questions&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 21:52:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Posting-large-dataset-to-SQL-table/m-p/690177#M209930</guid>
      <dc:creator>SAShole</dc:creator>
      <dc:date>2020-10-08T21:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: Posting large dataset to SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Posting-large-dataset-to-SQL-table/m-p/690197#M209946</link>
      <description>&lt;P&gt;What's the issue?&lt;/P&gt;
&lt;P&gt;Is the process too slow?&lt;/P&gt;
&lt;P&gt;Is the table too large?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do you talk to SQL Server?&lt;/P&gt;
&lt;P&gt;SAS/ACCESS Interface to ODBC?&lt;/P&gt;
&lt;P&gt;SAS/ACCESS Interface to OLEDB?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS/ACCESS Interface to Microsoft SQL Server?&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=acreldb&amp;amp;docsetTarget=p0378ek9nfsu5bn1cpsc8woi6qjf.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en"&gt;&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 20:57:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Posting-large-dataset-to-SQL-table/m-p/690197#M209946</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-10-08T20:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: Posting large dataset to SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Posting-large-dataset-to-SQL-table/m-p/690207#M209955</link>
      <description>Hi Chris,&lt;BR /&gt;The table takes to long to load into SQL. Run time is about 5 hours.&lt;BR /&gt;&lt;BR /&gt;I'm using SAS/ACESS interface with ODBC.&lt;BR /&gt;&lt;BR /&gt;Thank you!</description>
      <pubDate>Thu, 08 Oct 2020 21:42:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Posting-large-dataset-to-SQL-table/m-p/690207#M209955</guid>
      <dc:creator>SAShole</dc:creator>
      <dc:date>2020-10-08T21:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: Posting large dataset to SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Posting-large-dataset-to-SQL-table/m-p/690208#M209956</link>
      <description>What happens if you don't use SAS for the load, ie via SQL Server directly?  Is it set up with the bulkload option? &lt;BR /&gt;&lt;BR /&gt;Or try a PROC COPY instead? How long does that take instead of a SQL step?&lt;BR /&gt;&lt;BR /&gt;proc copy in=work out=db;&lt;BR /&gt;select bigDataSet;&lt;BR /&gt;run;</description>
      <pubDate>Thu, 08 Oct 2020 21:54:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Posting-large-dataset-to-SQL-table/m-p/690208#M209956</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-10-08T21:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: Posting large dataset to SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Posting-large-dataset-to-SQL-table/m-p/690212#M209958</link>
      <description>&lt;P&gt;See if the variables really need to be that long.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ODBC does not have a FASTLOAD option, but try adding&amp;nbsp;&amp;nbsp;&lt;FONT face="courier new,courier"&gt;insertbuff=10000&amp;nbsp;&lt;/FONT&gt; to your ODBC LIBNAME statement.&lt;/P&gt;
&lt;P&gt;Tweak the figure to see what's fastest for your data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 22:03:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Posting-large-dataset-to-SQL-table/m-p/690212#M209958</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-10-08T22:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: Posting large dataset to SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Posting-large-dataset-to-SQL-table/m-p/690213#M209959</link>
      <description>&lt;P&gt;The other option which might help is DBCOMMIT. Try similar values with that too.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 22:12:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Posting-large-dataset-to-SQL-table/m-p/690213#M209959</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-10-08T22:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Posting large dataset to SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Posting-large-dataset-to-SQL-table/m-p/690232#M209975</link>
      <description>&lt;P&gt;Well,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/7900"&gt;@SAShole&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Part of the problem is that you're using ODBC which isn't typically the best.&amp;nbsp; DB specific drivers are typically faster.&amp;nbsp; But of course we have what we have.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With Hive with ODBC, I found setting the INSERTBUFF and DBCOMMIT both in conjunction with one another to 32767 was the fastest -- &lt;EM&gt;significantly&lt;/EM&gt; faster than not setting them, but I can't say what setting would be best for your situation.&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp; helped me tremendously and walked me through that process, so you're in good hands there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 23:41:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Posting-large-dataset-to-SQL-table/m-p/690232#M209975</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2020-10-08T23:41:31Z</dc:date>
    </item>
  </channel>
</rss>

