<?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: ERROR: [Microsoft SQL Server]The batch could not be analyzed because of compile errors. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Microsoft-SQL-Server-The-batch-could-not-be-analyzed/m-p/666018#M199220</link>
    <description>&lt;P&gt;Hooray, Tech Support gave the decisive hint:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Within the Windows ODBC Datasource Administrator on the "Advanced" Tab you have to set the tick of the tick box "Enable Quoted Identifiers"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FK1_1-1593508892433.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/46787i6152B7BA9718D7A4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="FK1_1-1593508892433.png" alt="FK1_1-1593508892433.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jun 2020 09:21:52 GMT</pubDate>
    <dc:creator>FK1</dc:creator>
    <dc:date>2020-06-30T09:21:52Z</dc:date>
    <item>
      <title>ERROR: [Microsoft SQL Server]The batch could not be analyzed because of compile errors.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Microsoft-SQL-Server-The-batch-could-not-be-analyzed/m-p/665779#M199115</link>
      <description>&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do have a problem with the datasource (driver ???):&lt;/P&gt;&lt;P&gt;when firing this SAS code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;LIBNAME DATAMART sqlsvr schema='SAS_DATAMART' INSERTBUFF=32767 READBUFF=32767 DBCOMMIT=0 Datasrc=SAS_ACCESS_TREIBER;

proc freq data=DATAMART.CIContact;
table  CompanyCode;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I get the following error:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;ERROR: ERROR: [SAS][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Incorrect syntax near 'SAS_DATAMART'.&lt;BR /&gt;ERROR: ERROR: [SAS][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]The batch could not be analyzed because of compile errors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;However, when using the other datasource in the Libname Statement, everything works fine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;LIBNAME TSQL sqlsvr schema='SAS_DATAMART' INSERTBUFF=32767 READBUFF=32767 DBCOMMIT=0 Datasrc=MICROSOFT_SQL_TREIBER;


proc freq data=TSQL.CIContact;
table CompanyCode;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The reason, I have two similar datasources defined is, that we are using SAS Marketing Automation and we found out, that the performance on the database is much better when using SAS Access Driver from Data Direct (s0sqls27.dll) rather than using ODBC Driver 17 for SQL Server from Microsoft.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, it seems as if SAS Access driver causes troubles when using "outside" of SAS Marketing Automation context!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could I change something regarding the datasourve definition via Windows ODBC Admin Client in order to make the whole thing work?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2020 12:56:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Microsoft-SQL-Server-The-batch-could-not-be-analyzed/m-p/665779#M199115</guid>
      <dc:creator>FK1</dc:creator>
      <dc:date>2020-06-29T12:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: [Microsoft SQL Server]The batch could not be analyzed because of compile errors.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Microsoft-SQL-Server-The-batch-could-not-be-analyzed/m-p/665969#M199202</link>
      <description>&lt;P&gt;Maybe try removing options &lt;EM&gt;insertbuff&lt;/EM&gt; etc, as they may not be supported by the MA connection.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2020 01:39:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Microsoft-SQL-Server-The-batch-could-not-be-analyzed/m-p/665969#M199202</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-06-30T01:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: [Microsoft SQL Server]The batch could not be analyzed because of compile errors.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Microsoft-SQL-Server-The-batch-could-not-be-analyzed/m-p/665973#M199203</link>
      <description>&lt;P&gt;I was in the believe that the SAS provided driver is based on Data Direct. Is that the one which doesn't provide you with sufficient performance?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the docu &lt;A href="https://support.sas.com/documentation/installcenter/en/ikfdtnwx6sr/66390/PDF/default/sreq.pdf" target="_self"&gt;here&lt;/A&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;SAS/ACCESS Interface to Microsoft SQL Server&lt;BR /&gt;Base SAS is required for the installation of SAS/ACCESS Interface to Microsoft SQL Server.&lt;BR /&gt;SAS/ACCESS Interface to Microsoft SQL Server includes the required ODBC Driver&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;May be worth to get in contact with SAS Tech Support.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2020 02:19:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Microsoft-SQL-Server-The-batch-could-not-be-analyzed/m-p/665973#M199203</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-06-30T02:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: [Microsoft SQL Server]The batch could not be analyzed because of compile errors.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Microsoft-SQL-Server-The-batch-could-not-be-analyzed/m-p/665993#M199210</link>
      <description>Hi Chris,&lt;BR /&gt;&lt;BR /&gt;tried it out. The are supported. It works fine...</description>
      <pubDate>Tue, 30 Jun 2020 05:28:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Microsoft-SQL-Server-The-batch-could-not-be-analyzed/m-p/665993#M199210</guid>
      <dc:creator>FK1</dc:creator>
      <dc:date>2020-06-30T05:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: [Microsoft SQL Server]The batch could not be analyzed because of compile errors.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Microsoft-SQL-Server-The-batch-could-not-be-analyzed/m-p/665994#M199211</link>
      <description>&lt;P&gt;Hi Patrick,&lt;BR /&gt;&lt;BR /&gt;no, the Data Direct Driver is the one, which performs better, i.e. faster write and read figures from and to the Database. But this one causes the Error message when accessing Database tables within EG by using procedures like "PROC FREQ"....&lt;BR /&gt;&lt;BR /&gt;I already got in contact with Tech Support.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2020 05:31:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Microsoft-SQL-Server-The-batch-could-not-be-analyzed/m-p/665994#M199211</guid>
      <dc:creator>FK1</dc:creator>
      <dc:date>2020-06-30T05:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: [Microsoft SQL Server]The batch could not be analyzed because of compile errors.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Microsoft-SQL-Server-The-batch-could-not-be-analyzed/m-p/666018#M199220</link>
      <description>&lt;P&gt;Hooray, Tech Support gave the decisive hint:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Within the Windows ODBC Datasource Administrator on the "Advanced" Tab you have to set the tick of the tick box "Enable Quoted Identifiers"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FK1_1-1593508892433.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/46787i6152B7BA9718D7A4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="FK1_1-1593508892433.png" alt="FK1_1-1593508892433.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2020 09:21:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Microsoft-SQL-Server-The-batch-could-not-be-analyzed/m-p/666018#M199220</guid>
      <dc:creator>FK1</dc:creator>
      <dc:date>2020-06-30T09:21:52Z</dc:date>
    </item>
  </channel>
</rss>

