<?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: Set up a connection to Oracle by using metauser/metapass in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Set-up-a-connection-to-Oracle-by-using-metauser-metapass/m-p/85874#M18420</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can find all about this in the SAS Data Admin Guide&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://support.sas.com/documentation/cdl/en/bidsag/61236/PDF/default/bidsag.pdf"&gt;http://support.sas.com/documentation/cdl/en/bidsag/61236/PDF/default/bidsag.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Apr 2012 09:15:42 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2012-04-17T09:15:42Z</dc:date>
    <item>
      <title>Set up a connection to Oracle by using metauser/metapass</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Set-up-a-connection-to-Oracle-by-using-metauser-metapass/m-p/85873#M18419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;we wonder if it is possible to set up a connection to Oracle by using&lt;BR /&gt;the meta data information? Right now, we have strong doubts that this is even possible.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The following example does not work even if metauser and metapass are the same&lt;BR /&gt;as the Oracle user and password.&lt;/P&gt;&lt;P&gt;We use SAS 9.2 and Oracle 11g, both on Unix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;/*&amp;amp;_metauser*/&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;proc sql ;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;connect to oracle as oradb (user="&amp;amp;metauser" password="&amp;amp;metapass"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;path='ewh01');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;create view WORK.TESTVIEW as&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;select *&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;from connection to oradb&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;SELECT * FROM DUAL&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;disconnect from oradb;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;quit;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;/* ERROR: ORACLE connection error: ORA-01017: invalid username/password; logon denied. /*&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;/*&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;proc options;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;%put &amp;amp;sysuserid;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;*/&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 07:58:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Set-up-a-connection-to-Oracle-by-using-metauser-metapass/m-p/85873#M18419</guid>
      <dc:creator>metalray</dc:creator>
      <dc:date>2012-04-17T07:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: Set up a connection to Oracle by using metauser/metapass</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Set-up-a-connection-to-Oracle-by-using-metauser-metapass/m-p/85874#M18420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can find all about this in the SAS Data Admin Guide&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://support.sas.com/documentation/cdl/en/bidsag/61236/PDF/default/bidsag.pdf"&gt;http://support.sas.com/documentation/cdl/en/bidsag/61236/PDF/default/bidsag.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 09:15:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Set-up-a-connection-to-Oracle-by-using-metauser-metapass/m-p/85874#M18420</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2012-04-17T09:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: Set up a connection to Oracle by using metauser/metapass</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Set-up-a-connection-to-Oracle-by-using-metauser-metapass/m-p/85875#M18421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Patrick,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Sorry, but I dont think you can.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;There is hardly any information on&lt;BR /&gt;metauser/password information passed to&lt;BR /&gt;the Oracle server via PASS THROUGH.&lt;/P&gt;&lt;P&gt;PASS THROUGH is only talked about in respect&lt;BR /&gt;to Composite Information Server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note, if I substitute the METAUSER and METERPASS with&lt;BR /&gt;with the static values, the connection works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;I think its a problem with METAUSER&lt;/SPAN&gt; (which only is a single&lt;BR /&gt;time mentionded in the Admin Guide regarding PROC METALIB)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;metalray&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 09:55:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Set-up-a-connection-to-Oracle-by-using-metauser-metapass/m-p/85875#M18421</guid>
      <dc:creator>metalray</dc:creator>
      <dc:date>2012-04-17T09:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: Set up a connection to Oracle by using metauser/metapass</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Set-up-a-connection-to-Oracle-by-using-metauser-metapass/m-p/85876#M18422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's because explicit pass-through doesn't use SAS Metadata information (it's explicit).&lt;/P&gt;&lt;P&gt;You say that you've defined a user with the same name and credentials on the Oracle database (nothing to do with SAS metadata - it just happens that this user has the same name and credentials).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If using SQL developer or the like: can you connect from your machine with these credentials to the database?&lt;/P&gt;&lt;P&gt;Have you checked that the path entry (the Oracle alias name) in TNSNAMES.ORA actually points to the right database?&lt;/P&gt;&lt;P&gt;And if the connection works with SQL developer: In case your SAS code runs not on your machine but on a server then make sure that the TNSNAMES.ORA on this server is correct (N.B: The machine with the SAS Application Server not the SAS Metadata Server).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What the Admin Guide for which I've posted the link shows you in detail is how to properly set-up connectivity to an Oracle Server and it's databases in SAS metadata. Once this is done you can use library definitions in EG, DIS and the like almost as if these were SAS libraries. And with newer SAS EG versions you can even convert the code to explicit pass-through (it will read metadata information and use it to generate the connection string).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 11:06:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Set-up-a-connection-to-Oracle-by-using-metauser-metapass/m-p/85876#M18422</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2012-04-17T11:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: Set up a connection to Oracle by using metauser/metapass</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Set-up-a-connection-to-Oracle-by-using-metauser-metapass/m-p/85877#M18423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this...Hope it helps..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First need to create oracle server in SAS MC&lt;/P&gt;&lt;P&gt;Second create library and then define schema and register all the oracle tables in SAS MC&lt;/P&gt;&lt;P&gt;Then try this code to connect&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Options Metaserver="xxx.xxx.xxx.xxx" Metarepository=Foundation metauser="sasdemo" metapass="xxx@123" metaport=8561;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;libname sample META liburi="SASLibrary?@name='LibraryName'";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LibraryName is what you defined in the second step (library name).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 12:17:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Set-up-a-connection-to-Oracle-by-using-metauser-metapass/m-p/85877#M18423</guid>
      <dc:creator>shivas</dc:creator>
      <dc:date>2012-04-17T12:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: Set up a connection to Oracle by using metauser/metapass</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Set-up-a-connection-to-Oracle-by-using-metauser-metapass/m-p/85878#M18424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you place the Oracle credentials in metadata on the user identity, or a group that they are a member of, with a specific authentication domain (e.g. OracleAuth) you can then refer to that authentication domain in your SQL Pass Through code. SAS will then look up the credentials for the current metadata identity from metadata using the specified authentication domain when connecting to Oracle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;CODE&gt;proc sql;&lt;/CODE&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;CODE&gt;connect to oracle(authdomain="OracleAuth" ... &lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There's more info on this in the following SAS usage notes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="http://support.sas.com/kb/31/103.html"&gt;SAS Problem Note 31103: The SQL procedure's Pass-Through facility cannot manage metadata credentials&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="http://support.sas.com/kb/38/204.html"&gt;SAS Usage Note 38204: Using the AUTHDOMAIN= option with SAS/ACCESS® 9.2 engines&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 13:35:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Set-up-a-connection-to-Oracle-by-using-metauser-metapass/m-p/85878#M18424</guid>
      <dc:creator>PaulHomes</dc:creator>
      <dc:date>2012-04-17T13:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Set up a connection to Oracle by using metauser/metapass</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Set-up-a-connection-to-Oracle-by-using-metauser-metapass/m-p/85879#M18425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Patrick,&lt;BR /&gt;thanks for the reply.&lt;BR /&gt;Yes, the connection to the database works fine.&lt;BR /&gt;The Oracle connection is not a problem. The setup is completed.&lt;/P&gt;&lt;P&gt;"Once this is done you can use library definitions in EG"&lt;BR /&gt;I know that, and that works fine too. But I wont to have&lt;BR /&gt;a SQL PASS THROUGH code independent of libraries registered already.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Shiva, thanks again but we are well aware how to set up Oracle connections&lt;BR /&gt;and SAS ACCESS libraries. That all works fine. But I dont want to use a already registered&lt;BR /&gt;library in my case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Patrick&lt;BR /&gt;"And with newer SAS EG versions you can even convert the code to explicit pass-through (it will read metadata information and use it to generate the connection string)."&lt;BR /&gt;That sounds interesting. I hope it does not involve SAS ACCESS because I dont want to go via libraries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Paul, thanks for that. That was what I was looking for. You can also find the logins&lt;BR /&gt;when you use EG&amp;nbsp; &amp;gt; Tools -&amp;gt; SAS EG Explorer - &amp;gt; File - &amp;gt; Manage Logins&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2012 09:55:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Set-up-a-connection-to-Oracle-by-using-metauser-metapass/m-p/85879#M18425</guid>
      <dc:creator>metalray</dc:creator>
      <dc:date>2012-05-04T09:55:37Z</dc:date>
    </item>
  </channel>
</rss>

