I get error "ORA-28511: lost RPC connection to heterogeneous remote agent using SID" when using the SQL Server ODBC driver. What can I do?

The customers that reported this issue to us were using DG4ODBC to access an ODBC data source from Oracle 11g and 12g. Some of their SQL queries were working. Other queries that fetched a large number of records failed with the ORA-28511 error because of an Oracle timeout.

If your circumstances are similar:

  1. Turn on DG4ODBC tracing by including the following setting in your $ORACLE_HOME/hs/admin/initsid.ora file.
    HS_FDS_TRACE_LEVEL = 4
  2. Stop and start your Oracle Listener. Log in to SQL*Plus and try your query again. You should get a new log file (.trc) in the $ORACLE_HOME/hs/log directory. Check the log file for this error:
    HS Agent received unexpected RPC disconnect
    Network error 1003:  NCR-01003: NCRS: Read error.
  3. Edit sqlnet.ora file and set:
    SQLNET.INBOUND_CONNECT_TIMEOUT=0
  4. Stop and start your Oracle Listener. Log in to SQL*Plus and try your query again.
  5. Do one of the following:
    • If your query works, comment out the HS_FDS_TRACE_LEVEL entry. Stop and start your Oracle listener to turn off DG4ODBC tracing.

      –Or–

    • If your query still fails, send the following files and information to the Easysoft Support team ():
      • init(sid).ora
      • sqlnet.ora
      • The DG4ODBC log file generated.
      • The error shown in SQL*Plus.