You can do a SQL Set fields test of the remote DB (Through an Oracle
function to trap the error).
Oracle Function
CREATE OR REPLACE FUNCTION TEST_REMOTE_SYSTEM (strSQL VARCHAR2 )
RETURN VarChar2 IS
ResultList VarChar2(255);
TYPE RefCurTyp IS REF CURSOR;
myCursor RefCurTyp;
BEGIN
ResultList := NULL;
OPEN myCursor FOR strSQL;
FETCH myCursor INTO ResultList;
CLOSE myCursor;
RETURN trim(ResultList);
EXCEPTION
WHEN OTHERS THEN
RETURN NULL;
END TEST_REMOTE_SYSTEM;
/
To use this simply pass in your own SQL to test the remote system. In a
Set Fields from SQL action put in for the SQL.
Select TEST_REMOTE_SYSTEM( 'Select count(*) From
[EMAIL PROTECTED]' ) From Dual
You can do any SQL Select statement in the function as long as it
returns only 1 value. i.e.
Select ID From TABLE Where ROWNUM = 1
If you get a value back then the system is up. If you get NULL then the
remote system did not return anything and it is probably down.
Fred
________________________________
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of John Kovalcik
Sent: Thursday, May 22, 2008 8:48 AM
To: [email protected]
Subject: View Form - Remote DB not available.
**
Listers,
I have a view form(on ARS 6.3 - Oracle) that is looking at a
remote database table. If the remote database is not available, I get a
nasty Oracle error when trying to access the view form through workflow.
Is there anyway to check if the remote DB is available before I run my
workflow ??
Thanks,
__________________________
John Kovalcik
Sr. Service Management Analyst
[EMAIL PROTECTED]
Kennametal Inc. | 1600 Technology Way | Latrobe, PA 15650 |
www.kennametal.com
__Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"
html___
_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"