使用dblink - Oracle不再需要从套接字错误中读取数据

时间:2015-07-02 14:52:44

标签: oracle oracle11g dblink

即使我尝试执行简单查询,我也会收到此错误(无法从套接字读取数据):

SELECT 
T."ID" as user_id FROM "TEST"@DBLINK T where rownum<10

我已经在tracelog中查找了更多细节并得到了这个:

Thu Jul 02 11:23:46 2015 Archived Log entry 431583 added for thread 1 sequence 451623 ID 0x8ae0db51 dest 1: Thu Jul 02 11:30:32 2015 HS: Lost RPC connection to remote Agent... HS: ... Agent SID = (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.173)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=cf))), NCR status = -2147385341 Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x7FFF351D7F40] [PC:0x20E0101, kxsffir()+193] [flags: 0x0, count: 1] Errors in file /u01/app/oracle/diag/rdbms/bfdwbr/BFDWBR/trace/BFDWBR_ora_25533.trc (incident=1197429): ORA-07445: exception encountered: core dump [kxsffir()+193] [SIGSEGV] [ADDR:0x7FFF351D7F40] [PC:0x20E0101] [Address not mapped to object] [] 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=192.168.2.173)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=cf))) ORA-02063: preceding line from CF Incident details in: /u01/app/oracle/diag/rdbms/bfdwbr/BFDWBR/incident/incdir_1197429/BFDWBR_ora_25533_i1197429.trc Use ADRCI or Support Workbench to package the incident. See Note 411.1 at My Oracle Support for error and packaging details.

任何人都知道如何解决这个问题?

谢谢!

1 个答案:

答案 0 :(得分:0)

在我看来,这是一个间歇性的网络连接问题。短语&#34;丢失了RPC连接&#34;是一个很好的迹象。您还应该查看提到的跟踪文件。

作为测试,你可以制作一个类似

的脚本
DECLARE
  V_NUMBER NUMBER(9);
BEGIN
  FOR I IN 1 .. .500 LOOP
    BEGIN
      SELECT T."ID" AS USER_ID
        INTO V_NUMBER
        FROM "TEST"@DBLINK T
       WHERE ROWNUM = 1;
      DBMS_OUTPUT.PUT_LINE('time is ' || SYSDATE || 'User id is ' ||
                           V_NUMBER);
    END LOOP;

  END;

这可以让您了解中断何时发生或是否一致。