title: Oracle failing with "Unable to retrieve text of NETWORK/NCR message 65535", seemingly not reading initSID.ora
body: <p>First time setting up an ODBC link with Oracle. I've set up the listener.ora, tnsnames.ora, and the init file in \hs\admin, but the database link always fails with: </p>
  
  <pre><code>ORA-28545: error diagnosed by Net8 when connecting to an agent
  Unable to retrieve text of NETWORK/NCR message 65535
  ORA-02063: preceding 2 lines from EXTLINK
  28545. 0000 -  "error diagnosed by Net8 when connecting to an agent"
  *Cause:    An attempt to call an external procedure or to issue SQL
             to a non-Oracle system on a Heterogeneous Services database link
             failed at connection initialization.  The error diagnosed
             by Net8 NCR software is reported separately.
  *Action:   Refer to the Net8 NCRO error message.  If this isn't clear,
             check connection administrative setup in tnsnames.ora
             and listener.ora for the service associated with the
             Heterogeneous Services database link being used, or with
             'extproc_connection_data' for an external procedure call.
  Vendor code 28545
  </code></pre>
  
  <p>No trace file appears, which makes me think that the init file isn't even being read. I can connect to the ODBC database using Access, so I know it works. The ODBC drivers and DG4ODBC are both 64-bit.</p>
  
  <p>Here's what I've tried so far:</p>
  
  <ul>
  <li>I set the HOST in both files to the hostname, to the IP address, and to [HOSTNAME].[DOMAIN].local, but with no change.</li>
  <li>I made the connection address (PROTOCOL/HOST/PORT) in tnsnames.ora and listener.ora identical, but with no change.</li>
  <li>I replaced the HOST of the listener with random garbage and then TNSPING failed, which it doesn't do otherwise.</li>
  <li>I copied the tnsnames.ora.sample, initgd4odbc.ora, and listener.ora.sample files in hs\admin and made a test connection with no ODBC source at the end; but it fails in the same way, with no trace file generated.</li>
  <li>I put random characters for the SID_NAME in listener.ora and the SID in CONNECT_DATA in tnsnames.ora and still get the same error, with seemingly no other impact.</li>
  </ul>
  
  <p>Here are the ora files. Some names have been changed to protect confidentiality, but it's otherwise untouched.</p>
  
  <p>tnsnames.ora:</p>
  
  <pre><code>LISTENER_ORCL =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
  
  ORACLR_CONNECTION_DATA =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      )
      (CONNECT_DATA =
        (SID = CLRExtProc)
        (PRESENTATION = RO)
      )
    )
  
  
  ORCL =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
      (CONNECT_DATA =
        (SERVER = DEDICATED)
        (SERVICE_NAME = orcl.[DOMAINNAME].local)
      )
    )
  
  
  EXTLINK=
    (DESCRIPTION=
      (ADDRESS=(PROTOCOL=TCP)(HOST = [HOSTNAME])(PORT=1521))
      (CONNECT_DATA=(SID=EXTLINK))
      (HS=OK)
    )
  </code></pre>
  
  <p>listener.ora:</p>
  
  <pre><code>SID_LIST_LISTENER =
    (SID_LIST =
      (SID_DESC =
        (SID_NAME = CLRExtProc)
        (ORACLE_HOME = C:\app\[MYUSERNAME]\virtual\product\12.2.0\dbhome_1)
        (PROGRAM = extproc)
        (ENVS = "EXTPROC_DLLSONLY:C:\app\[MYUSERNAME]\virtual\product\12.2.0\dbhome_1\bin\oraclr12.dll")
      )
       (SID_DESC=
         (SID_NAME=EXTLINK)
         (ORACLE_HOME=C:\app\[MYUSERNAME]\virtual\product\12.2.0\dbhome_1)
         (PROGRAM=dg4odbc)
       )
    )
  
  
  LISTENER =
    (DESCRIPTION_LIST =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
        (ADDRESS = (PROTOCOL = TCP)(HOST = [HOSTNAME])(PORT = 1521))
      )
    )
  
  
  CONNECT_TIMEOUT_LISTENER = 0
  </code></pre>
  
  <p>%ORACLE_HOME\hs\admin\initEXTLINK.ora:</p>
  
  <pre><code># Windows
  HS_FDS_CONNECT_INFO = EXTLINK
  HS_FDS_TRACE_LEVEL = 255
  HS_FDS_FETCH_ROWS=1
  HS_KEEP_REMOTE_COLUMN_SIZE = LOCAL
  #HS_NLS_NCHAR=UCS2
  HS_LANGUAGE=AMERICAN_AMERICA.WE8ISO8859P1
  </code></pre>
  
  <p>Connect String:</p>
  
  <pre><code>CREATE PUBLIC DATABASE LINK EXTLINK CONNECT TO "Username" IDENTIFIED BY "Pass" USING 'EXTLINK';
  </code></pre>