| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
|  |  | |||
Home -> Community -> Usenet -> c.d.o.misc -> Re: database link testing
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
|  |  |