oracle - program around ora-02068 error ??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vquanski
    New Member
    • Jun 2009
    • 1

    oracle - program around ora-02068 error ??

    How to program around ora-02068 error

    On DB2 side, newbie to oracle platform. . .HELP !!

    Oracle procedure, db link to DB2, gets 02068 rpc disconnect errors inconsistently/randomly, each require manual resub for correction. No error messages, no contention, and response time on both platforms are OK.

    procedure:

    1. select....
    2. commit.
    3. execute immediate...alt er session...close dblink...
    4. exception

    We think it is getting stuck between 1 and 2 above, problems in communications, just hanging so exceptions do not catch errors. Theory is the next invoke generates the error message when it tries to reuse the hanging link, before it starts a new one. (?)

    Question: How can we program a band-aid to check the elapsed response time, interrupt and return control after 10 elapsed seconds, so we can retry and/or terminate cleanly as appropriate ??

    Thanks.
  • asp2
    New Member
    • Dec 2008
    • 10

    #2
    try testing the connection first before going to step 2 :

    you should enter into infinite loop (or until defined time) until connection replies ...

    try something like this :

    declare
    v_c number := 0;
    begin
    loop
    begin
    select 1 into v_c from dual where rownum = 1 @(db_link);

    if v_c = 1 then exit ; end if;

    exception when no_data_found then null ;
    end;
    end loop;
    end ;

    Comment

    Working...