<?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: what is the difference between direct  and pass through connection from sas to oracle database in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/what-is-the-difference-between-direct-and-pass-through/m-p/137023#M36917</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can connect SAS to Oracle database using two methods&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&amp;gt;&amp;gt;&amp;gt;LIBNAME statement using the ORACLE engine (provides direct and dynamic &lt;/P&gt;&lt;P&gt;access to the Oracle data). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; libname oralib oracle user=scott password=xxxxx &lt;/P&gt;&lt;P&gt; path=V2o7223 preserve_tab-names=yes; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2&amp;gt;&amp;gt;&amp;gt;The SQL Procedure Pass-Through Facility enables you to pass Oracle SQL &lt;/P&gt;&lt;P&gt;statements to an Oracle database for processing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; proc sql; &lt;/P&gt;&lt;P&gt; connect to oracle(user=scott password=tiger &lt;/P&gt;&lt;P&gt; path=dark_o8150); &lt;/P&gt;&lt;P&gt; create table test1 as &lt;/P&gt;&lt;P&gt; select * from connection to Oracle &lt;/P&gt;&lt;P&gt; (select * from Dept where rownum &amp;lt;=5); &lt;/P&gt;&lt;P&gt; quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Apr 2014 11:49:59 GMT</pubDate>
    <dc:creator>sudi</dc:creator>
    <dc:date>2014-04-29T11:49:59Z</dc:date>
    <item>
      <title>what is the difference between direct  and pass through connection from sas to oracle database</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/what-is-the-difference-between-direct-and-pass-through/m-p/137022#M36916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Pass through:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;proc sql;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; connect to oracle (path=dddd user=aaa orapw=cccc);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create table work.test as&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select * from connection to oracle (&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select...&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from...&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; disconnect from oracle;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Direct:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;proc sql;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; connect to oracle (path=dddd user=aaa orapw=cccc);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; execute (drop table A_TABLE) by oracle;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; execute (commit) by oracle;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; disconnect from oracle;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2014 03:47:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/what-is-the-difference-between-direct-and-pass-through/m-p/137022#M36916</guid>
      <dc:creator>chittamsri1_gmail_com</dc:creator>
      <dc:date>2014-04-29T03:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: what is the difference between direct  and pass through connection from sas to oracle database</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/what-is-the-difference-between-direct-and-pass-through/m-p/137023#M36917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can connect SAS to Oracle database using two methods&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&amp;gt;&amp;gt;&amp;gt;LIBNAME statement using the ORACLE engine (provides direct and dynamic &lt;/P&gt;&lt;P&gt;access to the Oracle data). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; libname oralib oracle user=scott password=xxxxx &lt;/P&gt;&lt;P&gt; path=V2o7223 preserve_tab-names=yes; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2&amp;gt;&amp;gt;&amp;gt;The SQL Procedure Pass-Through Facility enables you to pass Oracle SQL &lt;/P&gt;&lt;P&gt;statements to an Oracle database for processing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; proc sql; &lt;/P&gt;&lt;P&gt; connect to oracle(user=scott password=tiger &lt;/P&gt;&lt;P&gt; path=dark_o8150); &lt;/P&gt;&lt;P&gt; create table test1 as &lt;/P&gt;&lt;P&gt; select * from connection to Oracle &lt;/P&gt;&lt;P&gt; (select * from Dept where rownum &amp;lt;=5); &lt;/P&gt;&lt;P&gt; quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2014 11:49:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/what-is-the-difference-between-direct-and-pass-through/m-p/137023#M36917</guid>
      <dc:creator>sudi</dc:creator>
      <dc:date>2014-04-29T11:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: what is the difference between direct  and pass through connection from sas to oracle database</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/what-is-the-difference-between-direct-and-pass-through/m-p/137024#M36918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you will find that both your examples are pass through as they send the query through to Oracle, and Oracle executes it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pass through:&lt;/P&gt;&lt;P&gt;The query will be sent to the databases SQL interpreter and executed there with the result passed back to SAS.&amp;nbsp; Hence you need to use terminology permitted by the Database Interpreter, and can use additional functions associated or built within the database software - for example when I used OC it had a DECODE() function which I could use in pass through, but not in Direct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Direct:&lt;/P&gt;&lt;P&gt;This means the query is interpreted and executed by the SAS SQL interpreter.&amp;nbsp; Hence you can only use syntax/functions which are defined in SAS and standard SQL.&amp;nbsp; In my example above I would not be able to use DECODE() as it is not in SAS or standard SQL. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There may also be technical difference's to consider as well.&amp;nbsp; Not sure for instance if there is any delay/gain associated with pass through over direct, would assume that direct is faster.&amp;nbsp; Also if you access data from the database, then that would need the connection first, at least until you got the data out into a SAS dataset.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2014 12:19:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/what-is-the-difference-between-direct-and-pass-through/m-p/137024#M36918</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-04-29T12:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: what is the difference between direct  and pass through connection from sas to oracle database</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/what-is-the-difference-between-direct-and-pass-through/m-p/137025#M36919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="814511" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; has explained the difference in how it works. I 'd like to chip in my 2 cents on when and why you choose which.&lt;/P&gt;&lt;P&gt;1. Libname approach (Oracle/ODBC engine): small data, less joins, you get to see the familiar hierarchy SAS library structure.&lt;/P&gt;&lt;P&gt;2. Pass-thru: Big data, lots of joins. you get to enjoy high performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In option 1, data will be brought into SAS for processing. In option 2, data will be preprocessed inside database, which is not only saving the I/O, but also inheritably higher efficient comparing to SAS for its optimized index system, esp. when doing Cartesian product joins. SAS is not a database software, so it is NOT good at doing certain things, and SAS knows it,&amp;nbsp; this is why when SAS promotes its "High Performance Analytics", there is item called " in-database solution".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Personally I used a lot more pass-thru than libname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2014 13:08:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/what-is-the-difference-between-direct-and-pass-through/m-p/137025#M36919</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-04-29T13:08:27Z</dc:date>
    </item>
  </channel>
</rss>

