<?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: Does SAS9 and Viya Support SQL Server's Linked Server In Libname and ODBC? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Does-SAS9-and-Viya-Support-SQL-Server-s-Linked-Server-In-Libname/m-p/964567#M375636</link>
    <description>&lt;P&gt;Have you tried using SQL passthru to use the 4-part identifier reference ?&lt;/P&gt;
&lt;P&gt;Like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
 connect using SQLLIB;
 select * from connection to SQLLIB (
   SELECT * FROM [.\LNKSVR].master.sys.databases
 );
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 18 Apr 2025 04:19:29 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2025-04-18T04:19:29Z</dc:date>
    <item>
      <title>Does SAS9 and Viya Support SQL Server's Linked Server In Libname and ODBC?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Does-SAS9-and-Viya-Support-SQL-Server-s-Linked-Server-In-Libname/m-p/964480#M375611</link>
      <description>&lt;P&gt;Dear colleagues,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to know if you have any experience using SAS9 and Viya4 to access databases and tables that are hosted in SQL Server's Linked Server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In other words, can we have a library definition (i.e. libname statement) to access tables in a Linked Server?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please kindly share your know-how or KB documents that confirm it is not a supported feature.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Eddie&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Apr 2025 07:36:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Does-SAS9-and-Viya-Support-SQL-Server-s-Linked-Server-In-Libname/m-p/964480#M375611</guid>
      <dc:creator>Eddie305</dc:creator>
      <dc:date>2025-04-17T07:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: Does SAS9 and Viya Support SQL Server's Linked Server In Libname and ODBC?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Does-SAS9-and-Viya-Support-SQL-Server-s-Linked-Server-In-Libname/m-p/964567#M375636</link>
      <description>&lt;P&gt;Have you tried using SQL passthru to use the 4-part identifier reference ?&lt;/P&gt;
&lt;P&gt;Like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
 connect using SQLLIB;
 select * from connection to SQLLIB (
   SELECT * FROM [.\LNKSVR].master.sys.databases
 );
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Apr 2025 04:19:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Does-SAS9-and-Viya-Support-SQL-Server-s-Linked-Server-In-Libname/m-p/964567#M375636</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2025-04-18T04:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: Does SAS9 and Viya Support SQL Server's Linked Server In Libname and ODBC?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Does-SAS9-and-Viya-Support-SQL-Server-s-Linked-Server-In-Libname/m-p/964804#M375708</link>
      <description>&lt;P&gt;I don't have a SQL Server to play at this point, but if you can create an ODBC data source to your linked server, chances are that you can connect from SAS as well.&lt;/P&gt;
&lt;P&gt;I found this (old) hack on Stack Overflow:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/49994852/connection-string-for-linked-servers-database" target="_blank"&gt;Connection string for Linked Servers Database - Stack Overflow.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;But wouldn't it be easier to connect directly to your linked server?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Apr 2025 05:57:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Does-SAS9-and-Viya-Support-SQL-Server-s-Linked-Server-In-Libname/m-p/964804#M375708</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2025-04-22T05:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Does SAS9 and Viya Support SQL Server's Linked Server In Libname and ODBC?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Does-SAS9-and-Viya-Support-SQL-Server-s-Linked-Server-In-Libname/m-p/964806#M375710</link>
      <description>&lt;P&gt;Thank you for your sharing, but it is not the answer I expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My key question is whether we can or how to define a data library (i.e. libname statement) of a linked server which is on a SQL Server? Or is it a mission impossible?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Apr 2025 07:22:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Does-SAS9-and-Viya-Support-SQL-Server-s-Linked-Server-In-Libname/m-p/964806#M375710</guid>
      <dc:creator>Eddie305</dc:creator>
      <dc:date>2025-04-22T07:22:14Z</dc:date>
    </item>
  </channel>
</rss>

