Ora-28511 Lost RPC Connection Errors Calling Sql Server Procedure That Returns Recordset Using DG4MSQL

(Doc ID 1373428.1)

Last updated on AUGUST 25, 2017

Applies to:

Oracle Database Gateway for SQL Server - Version 11.2.0.2 to 11.2.0.3 [Release 11.2]
Information in this document applies to any platform.

Symptoms


When executing a remote SQL Server procedure that returns a recordset via Database Gateway for SQL*Server (DG4MSQL) 11.2,  the following error ORA-28511 is returned:

ORA-28511: lost RPC connection to heterogeneous remote agent using
SID=ORA-28511: lost RPC connection to heterogeneous remote agent using
SID=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=myhostname)(PORT=1528))(CONNECT_DATA=(SID=dg112msql)))


It works correctly in previous versions 11.1 or 10g of the Gateway.

Example:

DECLARE
vPtSql     varchar2(200);
nCount     int ;
nr         int;
c          int;
BEGIN
nCount := 0;
dbms_output.ENABLE(100000);
dbms_output.put_line(to_char(sysdate, 'dd-mm-yyyy hh24:mi:ss') || '
started');
vPtSql := 'exec sp_mytest';
c := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@dg112msql;
DBMS_HS_PASSTHROUGH.PARSE@dg112msql(c, vPtSql);
LOOP
  nr := DBMS_HS_PASSTHROUGH.FETCH_ROW@dg112msql(c);
  EXIT WHEN nr = 0;
  nCount := nCount + 1;
END LOOP;  
dbms_output.put_Line(nCount || ' rows fetched from remote site');
DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@dg112msql(c);
c := NULL;
dbms_output.put_line(to_char(sysdate, 'dd-mm-yyyy hh24:mi:ss') || '
finished');
END;

DECLARE
*
ERROR at line 1:
ORA-28511: lost RPC connection to heterogeneous remote agent using
SID=ORA-28511: lost RPC connection to heterogeneous remote agent using
SID=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=myhostname)(PORT=1528))(CONNECT_DA
TA
=(SID=dg112msql)))
ORA-02063: preceding line from DG112MSQL
ORA-06512: at line 15
Process ID: 10028
Session ID: 138 Serial number: 78

===>Result should be :
23-09-2011 15:19:29 started
23 rows fetched from remote site
23-09-2011 15:19:29 finished

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms