Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to Check whether Server is up in Oracle Stored Procedure
On 11 Oct 2004 00:29:39 -0700, aone1504_at_yahoo.com (Srini) wrote:
>We have a Oracle client where a trigger is present. A Stored procedure
>is associated with the trigger. And link between Oracle client and
>server is using DBLINK.
>
>When Oracle server machine is down or database server has crashed, we
>want the stored procedure not to be executed. The problem is we do not
>always come to know when the server machine is down ( for say,
>maintenance ).
>
>Can any one tell me how we can code this check (on the server) inside
>the Stored Procedure ?
>
>Regards,
>Srini
You'll get an exception in the stored procedure. Just trap the exception. If you really don't want the procedure to do anything code a dummy select * from dual_at_dblink
-- Sybrand Bakker, Senior Oracle DBAReceived on Mon Oct 11 2004 - 02:57:34 CDT