<?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: Sort Execution Failure when Writing to and from Oracle with Proc SQL. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Sort-Execution-Failure-when-Writing-to-and-from-Oracle-with-Proc/m-p/808569#M318836</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/5059"&gt;@DavidPhillips2&lt;/a&gt;, for reporting the response you got from SAS.&lt;/P&gt;</description>
    <pubDate>Tue, 19 Apr 2022 14:49:05 GMT</pubDate>
    <dc:creator>mkeintz</dc:creator>
    <dc:date>2022-04-19T14:49:05Z</dc:date>
    <item>
      <title>Sort Execution Failure when Writing to and from Oracle with Proc SQL.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sort-Execution-Failure-when-Writing-to-and-from-Oracle-with-Proc/m-p/808033#M318611</link>
      <description>&lt;P&gt;I ran into a sort of execution failure when working with a medium dataset of 16 million rows.&amp;nbsp; When joining with a small table, time_lookup to obtain one field.&amp;nbsp; I assumed this was due to the temp library size limitations so I changed the libname to write to Oracle and I wrote the base of the table to Oracle first so everything is in Oracle but the sort execution failure remains.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;

create table wip.Persistence_merged2 as
select pm.*, tl.ACADEMIC_PERIOD as TO_ACADEMIC_PERIOD
from wip.Persistence_merged1 pm
left join odsprod.time_lookup tl on pm.TO_ACADEMIC_PERIOD_DESC = tl.ACADEMIC_PERIOD_DESC;

quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2022 15:50:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sort-Execution-Failure-when-Writing-to-and-from-Oracle-with-Proc/m-p/808033#M318611</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2022-04-15T15:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Execution Failure when Writing to and from Oracle with Proc SQL.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sort-Execution-Failure-when-Writing-to-and-from-Oracle-with-Proc/m-p/808051#M318615</link>
      <description>&lt;P&gt;Try a hash:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data wip.Persistence_merged2;
set wip.Persistence_merged1;
if _n = 1
then do;
  length to_academic_period ...; /* define here */
  declare hash t1 (dataset:"odsprod.time_lookup (rename=(academic_period_desc=to_academic_period_desc academic_period=to_academic_period))");
  t1.definekey("to_academic_period_desc");
  t1.definedata("to_academic_period");
  t1.definedone();
end;
_n_ = t1.find();
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;As long as you don't push the whole operation to the DB by using explicit pass-through, SQL will create an enormous utility file in WORK (or UTILLOC, if that is defined).&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2022 16:25:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sort-Execution-Failure-when-Writing-to-and-from-Oracle-with-Proc/m-p/808051#M318615</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-04-15T16:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Execution Failure when Writing to and from Oracle with Proc SQL.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sort-Execution-Failure-when-Writing-to-and-from-Oracle-with-Proc/m-p/808052#M318616</link>
      <description>&lt;P&gt;If it is a temp library size issue, there will be a message in the log.&lt;/P&gt;
&lt;P&gt;With the information you have shared it is difficult to give a proper response.&lt;/P&gt;
&lt;P&gt;What does the log say?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2022 16:26:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sort-Execution-Failure-when-Writing-to-and-from-Oracle-with-Proc/m-p/808052#M318616</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2022-04-15T16:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Execution Failure when Writing to and from Oracle with Proc SQL.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sort-Execution-Failure-when-Writing-to-and-from-Oracle-with-Proc/m-p/808209#M318672</link>
      <description>&lt;P&gt;Please post your SAS log, including your WIP and ODSPROD LIBNAME statements so we can see where processing is happening.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If all of your processing is happening in Oracle then you won't be getting a sort execution failure in SAS.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Apr 2022 23:32:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sort-Execution-Failure-when-Writing-to-and-from-Oracle-with-Proc/m-p/808209#M318672</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-04-16T23:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Execution Failure when Writing to and from Oracle with Proc SQL.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sort-Execution-Failure-when-Writing-to-and-from-Oracle-with-Proc/m-p/808293#M318723</link>
      <description>&lt;P&gt;Knowing it was not running the process on Oracle allowed me to make progress.&amp;nbsp; If you have two Oracle libnames to two different schemas they must both use the same user name in the user name/password section of the libname otherwise the processing is done by SAS.&amp;nbsp; I copied one of my tables over to the other schema so the script can stays in Oracle.&amp;nbsp; I'm debugging more before posting more about the sorting error.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2022 12:51:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sort-Execution-Failure-when-Writing-to-and-from-Oracle-with-Proc/m-p/808293#M318723</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2022-04-18T12:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Execution Failure when Writing to and from Oracle with Proc SQL.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sort-Execution-Failure-when-Writing-to-and-from-Oracle-with-Proc/m-p/808300#M318728</link>
      <description>&lt;P&gt;There should be a way to use ONE libref to point to database.&amp;nbsp; &amp;nbsp;You can use a database option to change the schema used by implicit passthru using the SCHEMA= dataset option.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/acreldb/n1h1m1ethqxwryn1wu68m46hdp1u.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/acreldb/n1h1m1ethqxwryn1wu68m46hdp1u.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname myora oracle ... schema=X .... ;
data want;
 merge myora.table1 myora.table2 (schema=Y);
  by id;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2022 13:27:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sort-Execution-Failure-when-Writing-to-and-from-Oracle-with-Proc/m-p/808300#M318728</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-04-18T13:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Execution Failure when Writing to and from Oracle with Proc SQL.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sort-Execution-Failure-when-Writing-to-and-from-Oracle-with-Proc/m-p/808545#M318829</link>
      <description>&lt;P&gt;SAS Tech Support said to run the lines from this post before the code that errors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/kb/39/705.html" target="_blank"&gt;https://support.sas.com/kb/39/705.html&lt;/A&gt;&lt;/P&gt;
&lt;DIV&gt;proc options group=memory; run;&lt;BR /&gt;proc options option=(work utilloc) value; run;&lt;BR /&gt;proc options option=threads; run;&lt;/DIV&gt;
&lt;DIV&gt;options fullstimer msglevel=i ;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Then determined that the sort errors are likely due to the work library size for my user settings.&amp;nbsp; I'll ask our SAS admin to change my work library settings.&amp;nbsp; Writing intermediary output to the same Oracle schema and then running the next step worked but it takes a long time to write extra steps involving large tables from SAS to Oracle.&lt;/DIV&gt;</description>
      <pubDate>Tue, 19 Apr 2022 12:57:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sort-Execution-Failure-when-Writing-to-and-from-Oracle-with-Proc/m-p/808545#M318829</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2022-04-19T12:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Execution Failure when Writing to and from Oracle with Proc SQL.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sort-Execution-Failure-when-Writing-to-and-from-Oracle-with-Proc/m-p/808569#M318836</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/5059"&gt;@DavidPhillips2&lt;/a&gt;, for reporting the response you got from SAS.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 14:49:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sort-Execution-Failure-when-Writing-to-and-from-Oracle-with-Proc/m-p/808569#M318836</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2022-04-19T14:49:05Z</dc:date>
    </item>
  </channel>
</rss>

