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: database link testing

Re: database link testing

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Wed, 15 May 2002 15:17:55 GMT
Message-ID: <3CE27C20.5562B005@exesolutions.com>


Tim Cross wrote:

> Hi All,
>
> I was wondering if anyone has some advice on the best way to test that
> a database link is operational. I have some plsql scripts which use a
> database link to access a remote db and I want to be able to determine
> if the link is available - that is, I want to know the remote database
> is up and running and available, not that the link is just defined.
>
> I was thinking of doing something like selecting the sysdate from the
> remote db dual table, but thought perhaps there was a better
> technique.
>
> Any suggestions appreciated.
>
> Tim
> --

BEGIN
   SELECT COUNT(*)
   INTO x
   FROM all_objects@<link_name>;
EXCEPTION
   WHEN OTHERS THEN
      <do something>
END; Received on Wed May 15 2002 - 10:17:55 CDT

Original text of this message

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