Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Returning SQL errors from SQLPlus to TWS

Status
Not open for further replies.

nochilur

Technical User
Sep 8, 2003
2
JP
Hello,

We are planning to use Tivoli Workload Scheduler for scheduling sql scripts. We will use a batch file to call the sql and this batch file will be scheduled on TWS.

1. Can TWS get the Oracle error code or does it only recogonize 0 and 1 ?
2. If Tivoli can accept Oracle errors, how can it be passed from SQLPlus to the batch file and from the batch file to TWS?
3. If someone could provide sample code it would be great.

Thanks,
Sunder
 
sample pl/sql file
demo.sql:

set serveroutput on size 1000000;
set echo off;
set trim off;
variable status number;
trash Boolean;
declare
error_code varchar2(100);
:status:=2;
trash:=fn_a(error_code);
if not trash
then
:status:=1;
else
:status:=0;
end if;
end;
/

column status new_value status noprint
select :status status from dual;
exit &status



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top