title: Cx Oracle 'TNS could not resolve the connect identifier'
body: <p>I am connecting to an Oracle DB using LDAP and the Python cx_Oracle library. I have proper sqlnet.ora, ldap.ora and tnsnames.ora files. On my Windows machine everything works fine using the 12.1 Oracle client and the following Python code:</p>
  <pre><code>import cx_Oracle
  connection = cx_Oracle.connect(user/password@db, mode=cx_Oracle.SYSDBA)
  </code></pre>
  <p>I have installed the Oracle instant client 12.1 on my Linux machine (Debian) following the zip file installation method advised on the Oracle website (at the bottom of <a href="https://www.oracle.com/be/database/technologies/instant-client/linux-x86-64-downloads.html" rel="nofollow noreferrer">https://www.oracle.com/be/database/technologies/instant-client/linux-x86-64-downloads.html</a>).
  ldconfig correctly lists the oracle client libraries and their paths.</p>
  <p>I copy the exact same sqlnet.ora, ldap.ora and tnsnames.ora files from my Windows machine to my Linux machine
  in /opt/oracle/instantclient_12_1/network/admin, as advised by the cx_Oracle documentation.</p>
  <p>Now running the above Python code on my Linux machine I have the following error:</p>
  <p><code>cx_Oracle.DatabaseError: ORA-12154: TNS:could not resolve the connect identifier specified</code></p>
  <p>I tried as well setting the environment variable <code>TNS_ADMIN=/opt/oracle/instantclient_12_1/network/admin</code> and <code>ORACLE_HOME=/opt/oracle/instantclient_12_1/</code> with no success neither</p>
  <p>Could any of you help me debugging this and understand why the client config on my Linux machine does not work?</p>