<?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: ORACLE connection error: ORA-12154: TNS:could not resolve the connect identifier specifie in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/ERROR-ORACLE-connection-error-ORA-12154-TNS-could-not-resolve/m-p/805444#M24126</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your reply. I have solved the issue. So what happens? When I configured the Oracle client for SAS access to Oracle I relied on this tutoriel:&amp;nbsp;&lt;A href="https://blogs.sas.com/content/sgf/2017/04/25/how-to-configure-oracle-client-for-successful-access-to-oracle-databases-from-sas-viya/" target="_blank"&gt;https://blogs.sas.com/content/sgf/2017/04/25/how-to-configure-oracle-client-for-successful-access-to-oracle-databases-from-sas-viya/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;The tuto explains this:&amp;nbsp;&lt;SPAN&gt;To configure the Oracle client, create a file called tnsnames.ora, for example, in the /etc/ directory. Paste the following lines with the appropriate connection parameters of your Oracle DB into the tnsnames.ora file. (Replace&lt;/SPAN&gt;&lt;EM&gt;"your_tnsname", "your_oracle_host", "your_oracle_port"&lt;/EM&gt;&lt;SPAN&gt;and&lt;/SPAN&gt;&lt;EM&gt;"your_oracle_db_service_name"&lt;/EM&gt;&lt;SPAN&gt;with parameters according to your Oracle DB implementation)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;However I think that it is not a good practice. Why ? The tnsnames.ora used by Oracle software can be updated if you create a new service name like I did. So if you create a separate tnsnames.ora in /etc you need to update it each time when the original tnsnames.ora is modified.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I my situation I forgot to update the file /etc/tnsnames.ora. Thus, my new service names ORG is not present in /etc/tnsnames.ora then I got the issue. It is better to use TNS_ADMIN variable directly used in Oracle which is: $ORACLE_HOME/admin/network then you I don't need to each time update the file /etc/tnsnames.ora.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But finally yes I have solved my issue. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for your help. &lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Apr 2022 07:24:45 GMT</pubDate>
    <dc:creator>ibrwa</dc:creator>
    <dc:date>2022-04-01T07:24:45Z</dc:date>
    <item>
      <title>ERROR: ORACLE connection error: ORA-12154: TNS:could not resolve the connect identifier specified.</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/ERROR-ORACLE-connection-error-ORA-12154-TNS-could-not-resolve/m-p/804026#M24065</link>
      <description>&lt;P&gt;Dear SAS community,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to connect to Oracle with Libname statement but I got an error. I have done lot of research and checks but I'm blocked. I try to run the following libname statement:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;libname ORGORA Oracle user=ORG password="ORG" schema=ORG_SYS path="ORG";&lt;/PRE&gt;&lt;P&gt;I have the following error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;ERROR: ORACLE connection error: ORA-12154: TNS:could not resolve the connect identifier specified.&lt;BR /&gt;ERROR: Error in the LIBNAME statement.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Oracle and SAS are installed in the same server. I have made a look in the tnsnames.ora and I can find the path correctly defined:&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;ORG =&lt;BR /&gt;(DESCRIPTION =&lt;BR /&gt;(ADDRESS_LIST =&lt;BR /&gt;(ADDRESS = (PROTOCOL = TCP)(HOST = xxxxxxxxx)(PORT = 1521))&lt;BR /&gt;)&lt;BR /&gt;(CONNECT_DATA =&lt;BR /&gt;(SERVICE_NAME = ORG)&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I then check that in the server I can ping the path ORG which works fine also:&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;[oracle@xxxxx ~]$ tnsping ORG&lt;/P&gt;&lt;P&gt;TNS Ping Utility for Linux: Version 12.1.0.2.0 - Production on 25-MAR-2022 11:22:48&lt;/P&gt;&lt;P&gt;Copyright (c) 1997, 2014, Oracle. All rights reserved.&lt;/P&gt;&lt;P&gt;Used parameter files:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Used TNSNAMES adapter to resolve the alias&lt;BR /&gt;Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = xxxxxxx)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = ORG)))&lt;BR /&gt;OK (0 msec)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I have also check in SQL developer, and I can connect without any issues. Please see the attachment. I have restarted the database, restarted the listener but I'm blocked.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please help me ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much in advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Mar 2022 10:27:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/ERROR-ORACLE-connection-error-ORA-12154-TNS-could-not-resolve/m-p/804026#M24065</guid>
      <dc:creator>ibrwa</dc:creator>
      <dc:date>2022-03-25T10:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: ORACLE connection error: ORA-12154: TNS:could not resolve the connect identifier specifie</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/ERROR-ORACLE-connection-error-ORA-12154-TNS-could-not-resolve/m-p/804307#M24076</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;Successful connection with SQL developer means you have the proper credentials.&lt;BR /&gt;&amp;nbsp;Try using the following libname statements&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname ORGORA Oracle user=ORG password=ORG path=ORG;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Mar 2022 22:58:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/ERROR-ORACLE-connection-error-ORA-12154-TNS-could-not-resolve/m-p/804307#M24076</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2022-03-26T22:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: ORACLE connection error: ORA-12154: TNS:could not resolve the connect identifier specifie</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/ERROR-ORACLE-connection-error-ORA-12154-TNS-could-not-resolve/m-p/804319#M24078</link>
      <description>&lt;P&gt;Have you already seen this discussion?&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/ORACLE-connection-error/td-p/201064" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/ORACLE-connection-error/td-p/201064&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Mar 2022 00:43:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/ERROR-ORACLE-connection-error-ORA-12154-TNS-could-not-resolve/m-p/804319#M24078</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-03-27T00:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: ORACLE connection error: ORA-12154: TNS:could not resolve the connect identifier specifie</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/ERROR-ORACLE-connection-error-ORA-12154-TNS-could-not-resolve/m-p/805444#M24126</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your reply. I have solved the issue. So what happens? When I configured the Oracle client for SAS access to Oracle I relied on this tutoriel:&amp;nbsp;&lt;A href="https://blogs.sas.com/content/sgf/2017/04/25/how-to-configure-oracle-client-for-successful-access-to-oracle-databases-from-sas-viya/" target="_blank"&gt;https://blogs.sas.com/content/sgf/2017/04/25/how-to-configure-oracle-client-for-successful-access-to-oracle-databases-from-sas-viya/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;The tuto explains this:&amp;nbsp;&lt;SPAN&gt;To configure the Oracle client, create a file called tnsnames.ora, for example, in the /etc/ directory. Paste the following lines with the appropriate connection parameters of your Oracle DB into the tnsnames.ora file. (Replace&lt;/SPAN&gt;&lt;EM&gt;"your_tnsname", "your_oracle_host", "your_oracle_port"&lt;/EM&gt;&lt;SPAN&gt;and&lt;/SPAN&gt;&lt;EM&gt;"your_oracle_db_service_name"&lt;/EM&gt;&lt;SPAN&gt;with parameters according to your Oracle DB implementation)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;However I think that it is not a good practice. Why ? The tnsnames.ora used by Oracle software can be updated if you create a new service name like I did. So if you create a separate tnsnames.ora in /etc you need to update it each time when the original tnsnames.ora is modified.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I my situation I forgot to update the file /etc/tnsnames.ora. Thus, my new service names ORG is not present in /etc/tnsnames.ora then I got the issue. It is better to use TNS_ADMIN variable directly used in Oracle which is: $ORACLE_HOME/admin/network then you I don't need to each time update the file /etc/tnsnames.ora.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But finally yes I have solved my issue. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for your help. &lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 07:24:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/ERROR-ORACLE-connection-error-ORA-12154-TNS-could-not-resolve/m-p/805444#M24126</guid>
      <dc:creator>ibrwa</dc:creator>
      <dc:date>2022-04-01T07:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: ORACLE connection error: ORA-12154: TNS:could not resolve the connect identifier specifie</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/ERROR-ORACLE-connection-error-ORA-12154-TNS-could-not-resolve/m-p/805448#M24127</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/177308"&gt;@ibrwa&lt;/a&gt;&amp;nbsp;Thank you for sharing with the SAS community. Also feel free to add a comment to the referenced blog if you think there is a better or alternative way how to do this. I'm sure this will be helpful to others facing similar challenges in the future.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 07:45:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/ERROR-ORACLE-connection-error-ORA-12154-TNS-could-not-resolve/m-p/805448#M24127</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-04-01T07:45:34Z</dc:date>
    </item>
  </channel>
</rss>

