Connecting Tech Pros Worldwide Help | Site Map

oracle - program around ora-02068 error ??

Newbie
 
Join Date: Jun 2009
Posts: 1
#1: Jun 26 '09
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...alter 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.
Newbie
 
Join Date: Dec 2008
Posts: 9
#2: Jul 11 '09

re: oracle - program around ora-02068 error ??


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 ;
Reply

Tags
ora 02068, oracle, program, rpc disconnect