Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Remote database

Re: Remote database

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: Wed, 12 Feb 2003 07:15:58 +0000
Message-ID: <b2clbk$r9k$1@ctb-nnrp2.saix.net>


DA Morgan wrote:

> I test them with the following code:
>
> BEGIN
> SELECT table_name
> INTO i
> FROM all_tables_at_remote_database
> WHERE rownum = 1;
> EXCEPTION
> WHEN OTHERS THEN
> RAISE ...
> END;
Also remember that a valid link can give a connection error if you leave connections open.

If while that connection is open, and the remote db is for example bounced, that connection is downed.

When you try to use that connection again, you will get an ORA error. Run that exact same SQL immediately again, and it will work the 2nd time around.

You can work in an ALTER SESSION CLOSE DBLINK into the above PL/SQL code to make sure that any existing connection for that link is closed and a brand new one is opened.

Or you can trap the ORA whatever error (connection closed?) that results in the connection no longer be available, but the link valid and working.

--
Billy
Received on Wed Feb 12 2003 - 01:15:58 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US