<?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: Calling oracle SP through ODBC in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Calling-oracle-SP-through-ODBC/m-p/328386#M9615</link>
    <description>&lt;P&gt;By "Access violation" do you mean a SAS error, like a crash with a traceback? &amp;nbsp;Can you share the log from the error? &amp;nbsp;Might be a defect and if so, there might be a hotfix -- need details about your SAS version.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Typical syntax for a stored procedure from SAS that I've used:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
 connect to odbc (dsn=dsname /* and credentials */) ;
  execute (execute testproc) by odbc;
 disconnect from odbc;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 30 Jan 2017 13:10:02 GMT</pubDate>
    <dc:creator>ChrisHemedinger</dc:creator>
    <dc:date>2017-01-30T13:10:02Z</dc:date>
    <item>
      <title>Calling oracle SP through ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Calling-oracle-SP-through-ODBC/m-p/328376#M9614</link>
      <description>&lt;P class="cs95e872d0"&gt;&lt;SPAN class="cscf6bbf711"&gt;Hi ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="cs95e872d0"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="cs95e872d0"&gt;&lt;SPAN class="cscf6bbf711"&gt;I am using below code to execute a stored process (view) from oracle but its giving me "access violation" error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="cs95e872d0"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="cs95e872d0"&gt;&lt;SPAN class="cscf6bbf711"&gt;proc sql;&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;&lt;BR /&gt;&lt;SPAN class="cscf6bbf711"&gt;connect to odbc (dsn = dnsname user=xxxxx&amp;nbsp; pwd=xxxxx);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="cscf6bbf711"&gt;create table schema.table_name (compress = yes) as &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="cscf6bbf711"&gt;select * from connection to odbc (&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="cscf6bbf711"&gt;execute schema_name.view_name&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="cscf6bbf711"&gt;);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="cscf6bbf711"&gt;disconnect from odbc;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="cscf6bbf711"&gt;&amp;nbsp;quit; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2017 12:51:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Calling-oracle-SP-through-ODBC/m-p/328376#M9614</guid>
      <dc:creator>Jenish</dc:creator>
      <dc:date>2017-01-30T12:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calling oracle SP through ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Calling-oracle-SP-through-ODBC/m-p/328386#M9615</link>
      <description>&lt;P&gt;By "Access violation" do you mean a SAS error, like a crash with a traceback? &amp;nbsp;Can you share the log from the error? &amp;nbsp;Might be a defect and if so, there might be a hotfix -- need details about your SAS version.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Typical syntax for a stored procedure from SAS that I've used:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
 connect to odbc (dsn=dsname /* and credentials */) ;
  execute (execute testproc) by odbc;
 disconnect from odbc;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Jan 2017 13:10:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Calling-oracle-SP-through-ODBC/m-p/328386#M9615</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2017-01-30T13:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Calling oracle SP through ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Calling-oracle-SP-through-ODBC/m-p/328397#M9616</link>
      <description>&lt;P&gt;Judging from&amp;nbsp;the name after the word execute, I think you might want to extract from a view.&lt;/P&gt;
&lt;P&gt;If that is the case change your code to this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
  connect to odbc (dsn = dnsname user=xxxxx  pwd=xxxxx);
  create table schema.table_name (compress = yes) as 
    select * from connection to odbc (
      select * from schema_name.view_name
    );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Jan 2017 13:29:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Calling-oracle-SP-through-ODBC/m-p/328397#M9616</guid>
      <dc:creator>MichaelLarsen</dc:creator>
      <dc:date>2017-01-30T13:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calling oracle SP through ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Calling-oracle-SP-through-ODBC/m-p/328400#M9617</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/126209"&gt;@Jenish&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not sure if this is the case with calling an Oracle stored procedure via SAS/ACCESS Interface to ODBC, but SAS/ACCESS Interface to Oracle cannot return a result set, or output parameters, to SAS. It may be helpful to alter the stored procedure so that it writes its output to an Oracle table and then SELECT from the table.&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>Mon, 30 Jan 2017 13:31:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Calling-oracle-SP-through-ODBC/m-p/328400#M9617</guid>
      <dc:creator>JBailey</dc:creator>
      <dc:date>2017-01-30T13:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Calling oracle SP through ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Calling-oracle-SP-through-ODBC/m-p/328403#M9619</link>
      <description>&lt;P&gt;I am running the below code to call Stored process from oracle its giving me the error ( error log attached)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;connect to odbc as oracledb&lt;BR /&gt;(datasrc="RF_LMS" user=****&amp;nbsp;password=****&amp;nbsp;);&lt;/P&gt;&lt;P&gt;create table work.test_dataset as&lt;BR /&gt;select *&lt;BR /&gt;from connection to oracledb&lt;BR /&gt;(&lt;BR /&gt;execute HF_REPORTING.LMS_DATA_ARCHIVED&lt;/P&gt;&lt;P&gt;);&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2017 13:38:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Calling-oracle-SP-through-ODBC/m-p/328403#M9619</guid>
      <dc:creator>Jenish</dc:creator>
      <dc:date>2017-01-30T13:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calling oracle SP through ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Calling-oracle-SP-through-ODBC/m-p/328405#M9620</link>
      <description>I want to call a stored procedure from oracle will&lt;BR /&gt;select * from schema_name.view_name work.??</description>
      <pubDate>Mon, 30 Jan 2017 13:40:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Calling-oracle-SP-through-ODBC/m-p/328405#M9620</guid>
      <dc:creator>Jenish</dc:creator>
      <dc:date>2017-01-30T13:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Calling oracle SP through ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Calling-oracle-SP-through-ODBC/m-p/328407#M9621</link>
      <description>SAS/Access interface to SQL works perfect.&lt;BR /&gt;guess there should be some way out.</description>
      <pubDate>Mon, 30 Jan 2017 13:47:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Calling-oracle-SP-through-ODBC/m-p/328407#M9621</guid>
      <dc:creator>Jenish</dc:creator>
      <dc:date>2017-01-30T13:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: Calling oracle SP through ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Calling-oracle-SP-through-ODBC/m-p/328411#M9622</link>
      <description>&lt;P&gt;I found this post:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/General-SAS-Programming/Call-Oracle-stored-procedure-using-odbc/td-p/89822" target="_blank"&gt;Call-Oracle-stored-procedure-using-odbc/td-p/89822&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;with a similar problem and that was solved by using the Oracle statement CALL instead of EXECUTE.&lt;/P&gt;
&lt;P&gt;So your example would then be:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
connect to odbc (dsn = dnsname user=xxxxx  pwd=xxxxx);
create table schema.table_name (compress = yes) as 
select * from connection to odbc (
call schema_name.view_name
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I am not familiar with the difference between EXECUTE and CALL within Oracle.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2017 14:01:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Calling-oracle-SP-through-ODBC/m-p/328411#M9622</guid>
      <dc:creator>MichaelLarsen</dc:creator>
      <dc:date>2017-01-30T14:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: Calling oracle SP through ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Calling-oracle-SP-through-ODBC/m-p/328415#M9623</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/126209"&gt;@Jenish&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may be right. Who knows? I looked up the SAS Note regarding resultant sets and stored procedures.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/18/350.html" target="_self"&gt;Usage Note 18350: Calling stored procedures using SAS/ACCESS® Interface to Oracle&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't mind, can you provide Oracle stored procedure code.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 13:14:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Calling-oracle-SP-through-ODBC/m-p/328415#M9623</guid>
      <dc:creator>JBailey</dc:creator>
      <dc:date>2017-02-02T13:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: Calling oracle SP through ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Calling-oracle-SP-through-ODBC/m-p/328663#M9645</link>
      <description>&lt;P&gt;Hi used your code but this time it save me different error.&lt;/P&gt;&lt;P&gt;Please check the log attached.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2017 08:43:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Calling-oracle-SP-through-ODBC/m-p/328663#M9645</guid>
      <dc:creator>Jenish</dc:creator>
      <dc:date>2017-01-31T08:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: Calling oracle SP through ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Calling-oracle-SP-through-ODBC/m-p/329308#M9667</link>
      <description>@J BAILEY that's an institute internal link, you wish to post the corresponding public one &lt;span class="lia-unicode-emoji" title=":grinning_squinting_face:"&gt;😆&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;This might come on handy as well:&lt;BR /&gt;&lt;A href="https://docs.oracle.com/cd/B19306_01/server.102/b15658/app_odbc.htm#UNXAR423" target="_blank"&gt;https://docs.oracle.com/cd/B19306_01/server.102/b15658/app_odbc.htm#UNXAR423&lt;/A&gt;</description>
      <pubDate>Thu, 02 Feb 2017 07:04:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Calling-oracle-SP-through-ODBC/m-p/329308#M9667</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-02-02T07:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Calling oracle SP through ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Calling-oracle-SP-through-ODBC/m-p/329408#M9671</link>
      <description>Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13674"&gt;@LinusH&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;I have repaired the link. Thanks for letting me know.&lt;BR /&gt;&lt;BR /&gt;Here is the new link: &lt;A href="http://support.sas.com/kb/18/350.html" target="_blank"&gt;http://support.sas.com/kb/18/350.html&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Feb 2017 13:15:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Calling-oracle-SP-through-ODBC/m-p/329408#M9671</guid>
      <dc:creator>JBailey</dc:creator>
      <dc:date>2017-02-02T13:15:45Z</dc:date>
    </item>
  </channel>
</rss>

