<?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: Unable to connect to ODBC in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-connect-to-ODBC/m-p/482622#M286895</link>
    <description>&lt;P&gt;The error message is telling you there is no data source called SERVER defined in your odbc.ini (since you are on Unix) nor do you have a default ODBC driver defined. These need to be added before your connection will work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alternatively you could try defining everything in the connection string which will look similar to this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
 connect to odbc (noprompt = "server=MyServerName;DRIVER=SQL Server;uid=myusr1;pwd=mypwd1;");
  create table Want  as 
  select * from connection to odbc
  (SELECT *
   FROM [MyDatabase].[MySchema1].[MyTable]
   )
  ;
  disconnect from odbc;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 30 Jul 2018 21:48:31 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2018-07-30T21:48:31Z</dc:date>
    <item>
      <title>Unable to connect to ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-connect-to-ODBC/m-p/482599#M286893</link>
      <description>&lt;P&gt;I'm trying to making a connection to an ODBC server however I'm getting this error message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;ERROR: CLI error trying to establish connection: [unixODBC][Driver Manager]Data source name not found, and no default driver&lt;BR /&gt;specified&lt;BR /&gt;NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.&lt;BR /&gt;687 create table test1 as select * from connection to ODBC (&lt;BR /&gt;688 select&lt;BR /&gt;689 a.*&lt;BR /&gt;690 FROM rptingdata.roactreacc a&lt;BR /&gt;691 FETCH FIRST 20 ROWS ONLY&lt;BR /&gt;692&lt;BR /&gt;693 ) ;&lt;BR /&gt;NOTE: Statement not executed due to NOEXEC option.&lt;BR /&gt;694 disconnect from ODBC;&lt;BR /&gt;NOTE: Statement not executed due to NOEXEC option.&lt;BR /&gt;695 quit;&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc sql;
CONNECT TO ODBC (DSN=SERVER user=U212XXXX password = XXXXXXX );
create table test1 as select * from connection to ODBC (
select
a.*
FROM rptingdata.roactreacc a
FETCH FIRST 20 ROWS ONLY

) ;
disconnect from ODBC;&lt;BR /&gt;quit;&lt;/PRE&gt;&lt;P&gt;Any help would be appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2018 20:30:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-connect-to-ODBC/m-p/482599#M286893</guid>
      <dc:creator>jmoore168</dc:creator>
      <dc:date>2018-07-30T20:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to connect to ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-connect-to-ODBC/m-p/482603#M286894</link>
      <description>What happens if you try a libname connection instead of doing SQL Pass Through?</description>
      <pubDate>Mon, 30 Jul 2018 20:37:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-connect-to-ODBC/m-p/482603#M286894</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-07-30T20:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to connect to ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-connect-to-ODBC/m-p/482622#M286895</link>
      <description>&lt;P&gt;The error message is telling you there is no data source called SERVER defined in your odbc.ini (since you are on Unix) nor do you have a default ODBC driver defined. These need to be added before your connection will work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alternatively you could try defining everything in the connection string which will look similar to this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
 connect to odbc (noprompt = "server=MyServerName;DRIVER=SQL Server;uid=myusr1;pwd=mypwd1;");
  create table Want  as 
  select * from connection to odbc
  (SELECT *
   FROM [MyDatabase].[MySchema1].[MyTable]
   )
  ;
  disconnect from odbc;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Jul 2018 21:48:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-connect-to-ODBC/m-p/482622#M286895</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-07-30T21:48:31Z</dc:date>
    </item>
  </channel>
</rss>

