<?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: &amp;quot;Naming Conventions&amp;quot; error when trying to select data from oracle database in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/quot-Naming-Conventions-quot-error-when-trying-to-select-data/m-p/920898#M44505</link>
    <description>&lt;P&gt;Adding a count to make variable names unique is as &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/acreldb/n0vnyuzncldjabn1923ug8svx7uh.htm" target="_self"&gt;documented here&lt;/A&gt; both for validvarname V7 and ANY.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The &lt;A href="https://support.sas.com/kb/16/835.html" target="_self"&gt;SAS Note&lt;/A&gt; you referenced indicates that this behaviour exists since release&amp;nbsp;&lt;SPAN&gt;9.2 TS1M0.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;There are of course differences between maintenance releases but even the older release on server 1 is way past SAS9.2. But may-be this exact 9.4M3 release got this issue again.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Creating a view is what I would be doing always in such cases because it provides full control over the names on the SAS side.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't want to create such a view (or even better ask and Oracle DBA to create a view for you on the Oracle side) then you could also contact SAS Tech Support. May be this issue is already known for SAS9.4M3 and there is a patch for it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Be aware that SAS9.4 M3 has been released in July 2015 which means you should really upgrade not the least because this version is now even approaching the end of the grace period for Standard Support (&lt;A href="https://support.sas.com/en/technical-support/services-policies/sas-94-earlier.html" target="_self"&gt;Support Levels for SAS® 9.4 &amp;amp; Earlier Releases&lt;/A&gt;).&lt;/P&gt;</description>
    <pubDate>Tue, 19 Mar 2024 11:07:47 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2024-03-19T11:07:47Z</dc:date>
    <item>
      <title>"Naming Conventions" error when trying to select data from oracle database</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/quot-Naming-Conventions-quot-error-when-trying-to-select-data/m-p/920894#M44503</link>
      <description>&lt;P&gt;Hello, experts!&lt;/P&gt;
&lt;P&gt;We have two SAS clusters that are deployed on different servers. Let it be SERVER 1 and SERVER 2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;We have a problem with selecting data from oracle database table on SEVER 1&lt;/STRONG&gt;. Part of log with query and error looks like this:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;------------------SERVER 1 LOG---------------------------&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;LIBNAME DWH_R ORACLE&lt;BR /&gt;&lt;STRONG&gt;PRESERVE_COL_NAMES=YES &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;PRESERVE_TAB_NAMES=YES&lt;/STRONG&gt;&lt;BR /&gt;DBMAX_TEXT=32767&lt;BR /&gt;READBUFF=7500 INSERTBUFF=7500&lt;BR /&gt;PATH=***&lt;BR /&gt;SCHEMA=***&lt;BR /&gt;USER=***&lt;/P&gt;
&lt;P&gt;PASSWORD=***&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;NOTE: Libref DWH_R was successfully assigned as follows:&lt;/P&gt;
&lt;P&gt;Engine: ORACLE&lt;BR /&gt;Physical Name: ***&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;options validvarname=any;&lt;/STRONG&gt;&lt;BR /&gt;options sastrace=',,,ds' sastraceloc=saslog nostsuffix&lt;BR /&gt;sql_ip_trace=(note, source) msglevel=i fullstimer;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;proc sql dquote=ansi;&lt;BR /&gt;&lt;STRONG&gt;select * from dwh_r.'S0208$KBS_CHAT_BOT_SUGGEST'n;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ORACLE_4: Prepared: on connection 21&lt;BR /&gt;SELECT * FROM "DWH_STAGE2"."S0208$KBS_CHAT BOT_SUGGEST"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Summary Statistics for ORACLE are:&lt;BR /&gt;Total SQL prepare seconds were: 0.000822&lt;BR /&gt;Total seconds used by the ORACLE ACCESS engine were 0.002057&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;ERROR: This DBMS table or view cannot be accessed by the SAS System because it contains column names that are&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;normalized (uppercased) compare is performed. See "Naming Conventions" in the SAS/ACCESS documentation.&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;not unique&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;------------------SERVER 1 LOG---------------------------&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We think, that the problem is due to certain long names of table fields, which after being cut off (SAS accepts field names of no more than 30 characters) become the same like this two fields with long labels:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="John_Wick_0-1710840930882.png" style="width: 567px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/94749iC8D837BBEF842C76/image-dimensions/567x245?v=v2" width="567" height="245" role="button" title="John_Wick_0-1710840930882.png" alt="John_Wick_0-1710840930882.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;But in SAS, there is a special VALIDVARNAME option&lt;/STRONG&gt;, which in any case will change the name to a unique one by adding an index to the end of the name, as shown in "Name" field in the picture above. This is what happens on our SERVER 2 (part of log with query):&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;------------------SERVER 2 LOG---------------------------&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;LIBNAME DWH_R ORACLE&lt;BR /&gt;&lt;STRONG&gt;PRESERVE_COL_NAMES=YES &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;PRESERVE_TAB_NAMES=YES&lt;/STRONG&gt;&lt;BR /&gt;DBMAX_TEXT=32767&lt;BR /&gt;READBUFF=7500 INSERTBUFF=7500&lt;BR /&gt;PATH=***&lt;BR /&gt;SCHEMA=***&lt;BR /&gt;USER=***&lt;/P&gt;
&lt;P&gt;PASSWORD=***&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;NOTE: Libref DWH_R was successfully assigned as follows:&lt;/P&gt;
&lt;P&gt;Engine: ORACLE&lt;BR /&gt;Physical Name: ***&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;options validvarname=any;&lt;/STRONG&gt;&lt;BR /&gt;options sastrace=',,,ds' sastraceloc=saslog nostsuffix&lt;BR /&gt;sql_ip_trace=(note, source) msglevel=i fullstimer;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;proc sql dquote=ansi outobs=10;&lt;BR /&gt;select * from dwh_r.'S0208$KBS_CHAT_BOT_SUGGEST'n;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ORACLE_5: Prepared: on connection 6&lt;BR /&gt;SELECT * FROM "DWH_R"."S0208$KBS_CHAT BOT_SUGGEST"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SQL_IP_TRACE: None of the SQL was directly passed to the DBMS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ORACLE_6: Executed: on connection 6&lt;/P&gt;
&lt;P&gt;SELECT statement&amp;nbsp; ORACLE_5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WARNING: Statement terminated early due to OUTOBS=10 option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Summary Statistics for ORACLE are:&lt;BR /&gt;Total row fetch seconds were: 0.336985&lt;BR /&gt;Total SQL execution seconds were:&amp;nbsp;0.031686&lt;BR /&gt;Total SQL prepare seconds were: 0.001000&lt;BR /&gt;Total seconds used by the ORACLE ACCESS engine were 1.934726&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: Procedure SQL used (Total process time):&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;------------------SERVER 2 LOG---------------------------&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What points have been checked already?&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;different combination of validvarname and validmemname options (this did not help)&lt;/LI&gt;
&lt;LI&gt;output comparison of proc options command on both workspace server's (this did not help)&lt;/LI&gt;
&lt;LI&gt;Attempt to reproduce the error on SERVER 2 (this step was unsuccessful)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Both servers use SAS 9.4:&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;SERVER 1 - &lt;STRONG&gt;9.4 (TS1M3)&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;SERVER 2 - &lt;STRONG&gt;9.4 (TS1M7)&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;There is a feeling that SAS on SERVER 1 does not respond to the VALIDVARNAME option. Can version of SAS affect this?&lt;/P&gt;
&lt;P&gt;We also found SAS note for this error - &lt;A href="https://support.sas.com/kb/16/835.html" target="_blank" rel="noopener"&gt;16835 - An error occurs when DBMS tables do not have unique column names and you try to reference a specific table in SAS® code&lt;/A&gt;. It suggests creating a VIEW of this table, but we want to avoid this, because on SERVER 2, select to the table works perfectly without creating a VIEW.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will be grateful for any useful information and any thoughts on this matter!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 10:10:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/quot-Naming-Conventions-quot-error-when-trying-to-select-data/m-p/920894#M44503</guid>
      <dc:creator>John_Wick</dc:creator>
      <dc:date>2024-03-19T10:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: "Naming Conventions" error when trying to select data from oracle database</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/quot-Naming-Conventions-quot-error-when-trying-to-select-data/m-p/920898#M44505</link>
      <description>&lt;P&gt;Adding a count to make variable names unique is as &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/acreldb/n0vnyuzncldjabn1923ug8svx7uh.htm" target="_self"&gt;documented here&lt;/A&gt; both for validvarname V7 and ANY.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The &lt;A href="https://support.sas.com/kb/16/835.html" target="_self"&gt;SAS Note&lt;/A&gt; you referenced indicates that this behaviour exists since release&amp;nbsp;&lt;SPAN&gt;9.2 TS1M0.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;There are of course differences between maintenance releases but even the older release on server 1 is way past SAS9.2. But may-be this exact 9.4M3 release got this issue again.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Creating a view is what I would be doing always in such cases because it provides full control over the names on the SAS side.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't want to create such a view (or even better ask and Oracle DBA to create a view for you on the Oracle side) then you could also contact SAS Tech Support. May be this issue is already known for SAS9.4M3 and there is a patch for it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Be aware that SAS9.4 M3 has been released in July 2015 which means you should really upgrade not the least because this version is now even approaching the end of the grace period for Standard Support (&lt;A href="https://support.sas.com/en/technical-support/services-policies/sas-94-earlier.html" target="_self"&gt;Support Levels for SAS® 9.4 &amp;amp; Earlier Releases&lt;/A&gt;).&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 11:07:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/quot-Naming-Conventions-quot-error-when-trying-to-select-data/m-p/920898#M44505</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2024-03-19T11:07:47Z</dc:date>
    </item>
  </channel>
</rss>

