<?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 Libname syntax from connection string in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-syntax-from-connection-string/m-p/444959#M28779</link>
    <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone show me how how to convert my connection string into a Libname statement?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see below, I have the HOST, PORT, SERVICE NAME, USER &amp;amp; PASSWORD.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use these credentials to create a Libname statement &amp;amp; use in a Pass Thru query to Oracle, any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname mylib oracle&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;connect to oracle as ora (path="(DESCRIPTION=(ADDRESS = (PROTOCOL = TCP)
(HOST = xxxxxxxxxxxxxxx.com)(PORT = 1234))
(CONNECT_DATA = (SERVICE_NAME=xxxxxxx)))
user=xxxxxxx pw=xxxxxxxx);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 12 Mar 2018 22:14:40 GMT</pubDate>
    <dc:creator>OscarBoots2</dc:creator>
    <dc:date>2018-03-12T22:14:40Z</dc:date>
    <item>
      <title>Libname syntax from connection string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-syntax-from-connection-string/m-p/444959#M28779</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone show me how how to convert my connection string into a Libname statement?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see below, I have the HOST, PORT, SERVICE NAME, USER &amp;amp; PASSWORD.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use these credentials to create a Libname statement &amp;amp; use in a Pass Thru query to Oracle, any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname mylib oracle&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;connect to oracle as ora (path="(DESCRIPTION=(ADDRESS = (PROTOCOL = TCP)
(HOST = xxxxxxxxxxxxxxx.com)(PORT = 1234))
(CONNECT_DATA = (SERVICE_NAME=xxxxxxx)))
user=xxxxxxx pw=xxxxxxxx);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Mar 2018 22:14:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-syntax-from-connection-string/m-p/444959#M28779</guid>
      <dc:creator>OscarBoots2</dc:creator>
      <dc:date>2018-03-12T22:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: Libname syntax from connection string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-syntax-from-connection-string/m-p/445148#M28796</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/175636"&gt;@OscarBoots2&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you get a chance to review &lt;A href="http://go.documentation.sas.com/?docsetId=acreldb&amp;amp;docsetTarget=p1qft7bzdij79zn1bxh59mc3w8xj.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=fr" target="_self"&gt;LIBNAME Statement Specifics for Oracle&lt;/A&gt; ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It shows you can use, for instance:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname x oracle user=myusr1 pw=mypwd1 
  path="(DESCRIPTION= 
          (ADDRESS_LIST=
            (ADDRESS= (PROTOCOL=TCP)(HOST=pinkfloyd)(PORT=1521))
             )
              (CONNECT_DATA= 
       "  	     (SID=alien)
       "   )
       " )
       " ";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope that helps.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Damo&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 13:10:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-syntax-from-connection-string/m-p/445148#M28796</guid>
      <dc:creator>Damo</dc:creator>
      <dc:date>2018-03-13T13:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Libname syntax from connection string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-syntax-from-connection-string/m-p/445346#M28804</link>
      <description>&lt;P&gt;Thanks Damo,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried to adapt this to my settings, which currently work in other queries, but I get a&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname mylib oracle user=XXXXXX pw=XXXXXX 
path="(DESCRIPTION=
		(ADDRESS = (PROTOCOL = TCP) 
			(HOST = XXXXXXXXXXX.com)(PORT = 1234))
				(CONNECT_DATA = (SERVICE_NAME=XXXXXX)))";

proc sql noprint;

create table TABLE1 as select * from connection to mylib 
( 
select DISTINCT 
ID

FROM DBC.TABLE2

WHERE ROWNUM &amp;lt; 50
)
;QUIT;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The error is below but doesn't make sense as my credentials are correct?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ERROR: The MYLIB engine cannot be found.
ERROR: A Connection to the mylib DBMS is not currently supported, or is not installed at your site.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Mar 2018 22:28:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-syntax-from-connection-string/m-p/445346#M28804</guid>
      <dc:creator>OscarBoots2</dc:creator>
      <dc:date>2018-03-13T22:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: Libname syntax from connection string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-syntax-from-connection-string/m-p/445499#M28821</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/175636"&gt;@OscarBoots2&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Thanks Damo,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've tried to adapt this to my settings, which currently work in other queries, but I get a&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname mylib oracle user=XXXXXX pw=XXXXXX 
path="(DESCRIPTION=
		(ADDRESS = (PROTOCOL = TCP) 
			(HOST = XXXXXXXXXXX.com)(PORT = 1234))
				(CONNECT_DATA = (SERVICE_NAME=XXXXXX)))";

proc sql noprint;

create table TABLE1 as select * from connection to mylib 
( 
select DISTINCT 
ID

FROM DBC.TABLE2

WHERE ROWNUM &amp;lt; 50
)
;QUIT;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The error is below but doesn't make sense as my credentials are correct?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ERROR: The MYLIB engine cannot be found.
ERROR: A Connection to the mylib DBMS is not currently supported, or is not installed at your site.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Show the code from the LOG with error message.&lt;/P&gt;
&lt;P&gt;The error would make me think the actual submitted code used:&lt;/P&gt;
&lt;P&gt;libname oracle mylib ...&lt;/P&gt;
&lt;P&gt;The engine, such as oracle,&amp;nbsp;when used should follow the libref&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 15:07:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-syntax-from-connection-string/m-p/445499#M28821</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-03-14T15:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: Libname syntax from connection string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-syntax-from-connection-string/m-p/445648#M28823</link>
      <description>&lt;P&gt;Thanks ballardw,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code submitted is in the order I posted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;such as;&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token statement"&gt;libname&lt;/SPAN&gt; mylib oracle user&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;XXXXXX pw&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;XXXXXX 
path&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"(DESCRIPTION=
		(ADDRESS = (PROTOCOL = TCP) 
			(HOST = XXXXXXXXXXX.com)(PORT = 1234))
				(CONNECT_DATA = (SERVICE_NAME=XXXXXX)))"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any ideas as what may be wrong otherwise?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 22:04:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-syntax-from-connection-string/m-p/445648#M28823</guid>
      <dc:creator>OscarBoots2</dc:creator>
      <dc:date>2018-03-14T22:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: Libname syntax from connection string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-syntax-from-connection-string/m-p/445652#M28824</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/175636"&gt;@OscarBoots2&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to&amp;nbsp;reuse a previously defined library, I think you have to use "&lt;A href="http://documentation.sas.com/?docsetId=sqlproc&amp;amp;docsetTarget=n0dvpyfvarx8cun1xif861xhh3k5.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;connect using&lt;/A&gt; &lt;EM&gt;libref&lt;/EM&gt;".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your case, it would look like this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Libname mylib oracle ...;

PROC SQL;
  CONNECT USING mylib;
  ...;&lt;BR /&gt;  DISCONNECT FROM MYLIB;&lt;BR /&gt;QUIT;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is new with SAS 9.3.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;BR /&gt;Damo&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 22:31:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-syntax-from-connection-string/m-p/445652#M28824</guid>
      <dc:creator>Damo</dc:creator>
      <dc:date>2018-03-14T22:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: Libname syntax from connection string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-syntax-from-connection-string/m-p/446966#M28906</link>
      <description>&lt;P&gt;Hi Damo,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's strange but the word CONNECT is coloured Orange?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I remove the ';' after 'proc sql noprint' it goes back to black as it should be?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Mar 2018 23:08:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-syntax-from-connection-string/m-p/446966#M28906</guid>
      <dc:creator>OscarBoots2</dc:creator>
      <dc:date>2018-03-19T23:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: Libname syntax from connection string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-syntax-from-connection-string/m-p/451302#M29163</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/175636"&gt;@OscarBoots2&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you post the entire code and its log ?&lt;/P&gt;
&lt;P&gt;Did you try to apply an existing sample code to your case, just to see the result ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;BR /&gt;Damo&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 20:01:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-syntax-from-connection-string/m-p/451302#M29163</guid>
      <dc:creator>Damo</dc:creator>
      <dc:date>2018-04-04T20:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Libname syntax from connection string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-syntax-from-connection-string/m-p/451313#M29164</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13934"&gt;@Damo&lt;/a&gt;&amp;nbsp;- I tried this in EG 7.1 and I can reproduce the orange colour error. It appears EG doesn't colour code CONNECT USING correctly. The code runs fine though.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 20:59:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-syntax-from-connection-string/m-p/451313#M29164</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-04-04T20:59:00Z</dc:date>
    </item>
  </channel>
</rss>

