Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to skip unreachable remote db from pl/sql for loop?

Status
Not open for further replies.

beksalur

Technical User
Jan 2, 2003
74
0
0
TR
hi,
I am accesssing different 16 nodes(dbs) from a central database to count same tables. But sometimes networks goes down at a radomly site. In that case checking if network is down how can i continue in code to next node without drop into runtime exception?

Thanks in advance.

Serdar Can
 
Use a PRAGMA exception to trap specific errors within a nested PL/SQL block, such as -3113 perhaps, and allow execution to continue thereafter. A very simple example:

Code:
BEGIN
  DECLARE
    l_error EXCEPTION;
    PRAGMA Exception_Init(l_error,-3113);
  BEGIN
    read_table_here;
  EXCEPTION
    WHEN l_error
    THEN
      Null;
--
    WHEN OTHERS
    THEN
      Raise;
  END;
END;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top