title: tnsping resolves but not able to connect using script
body: <p>I am not able to connect to an oracle database from my R/Python scripts. Following is the code. TNSPing utility is able to resolve the database using LDAP. I am pasting TNSPING output as well.</p>
  
  <p><strong>TNSPing output</strong></p>
  
  <pre><code>C:\Windows\System32&gt;tnsping UHK00500_SECCOMPAS_APPL
  
  TNS Ping Utility for 32-bit Windows: Version 11.2.0.2.0 - Production on 12-APR-2
  013 10:26:26
  
  Copyright (c) 1997, 2010, Oracle.  All rights reserved.
  
  Used parameter files:
  c:\apps\oracle\network\admin\sqlnet.ora
  
  Used LDAP adapter to resolve the alias
  Attempting to contact (DESCRIPTION = (SDU = 8192) (TDU = 8192) (ADDRESS_LIST = (
  ADDRESS = (PROTOCOL = TCP)(HOST = PHKLOD2002-SCAN.ap.hedani.net)(PORT = 1522)) (
  LOAD_BALANCE = on) (FAILOVER = on ) ) (CONNECT_DATA = (SERVICE_NAME = UHK00500_S
  ECCOMPAS_APPL.WORLD) (FAILOVER_MODE = (TYPE = session) (METHOD = basic) (RETRIES
   = 20) (DELAY = 5))))
  OK (60 msec)
  </code></pre>
  
  <p><strong>R script output</strong></p>
  
  <p><strong>Oracle 11g driver</strong></p>
  
  <blockquote>
    <p>chan &lt;- odbcDriverConnect("driver=Oracle in     OraHome112_32;DBQ=UHK00500_SECCOMPAS_APPL;UID=toolkit;PWD=<strong>**</strong>")
        Warning messages:
        1: In odbcDriverConnect("driver=Oracle in OraHome112_32;DBQ=UHK00500_SECCOMPAS_APPL;UID=toolkit;PWD=<strong>**</strong>") :
          [RODBC] ERROR: state 08004, code 12154, message [Oracle][ODBC][Ora]ORA-12154: TNS:could not resolve the connect identifier specified
    2: In odbcDriverConnect("driver=Oracle in OraHome112_32;DBQ=UHK00500_SECCOMPAS_APPL;UID=toolkit;PWD=<strong>**</strong>") :
      ODBC connection failed</p>
  </blockquote>
  
  <p><strong>ODBC driver output</strong></p>
  
  <blockquote>
    <p>chan &lt;- odbcDriverConnect("Driver={Microsoft ODBC for Oracle};Server=UHK00500_SECCOMPAS_APPL;Uid=toolkit;Pwd=<strong>**</strong>")
    Warning messages:
    1: In odbcDriverConnect("Driver={Microsoft ODBC for Oracle};Server=UHK00500_SECCOMPAS_APPL;Uid=toolkit;Pwd=<strong>*</strong>") :
      [RODBC] ERROR: state 08001, code 12154, message [Microsoft][ODBC driver for Oracle][Oracle]ORA-12154: TNS:could not resolve the connect identifier specified
    2: In odbcDriverConnect("Driver={Microsoft ODBC for Oracle};Server=UHK00500_SECCOMPAS_APPL;Uid=toolkit;Pwd=<strong>**</strong>") :
      ODBC connection failed</p>
  </blockquote>
  
  <p>Can someone please advice what i should check here to correct this issue?</p>