Stored Procedure: Wrong number or types of arguments (ORA)
Posted: Tue Aug 16, 2011 5:00 am
Hi,
I wanted to create a stored procedure (within a parallel job) to write the reject output to a dedicated Oracle table by means of an Oracle stored procedure. Although the invoked procedure will eventually contain several parameters (the rerect outpuy being one of them), it has been stripped to a lean 1-argument procedure (to narrow down the conceivable error causes). I've tried this and that but did not get it working... Hereunder you'll find more details:
1. The stored procedure argument is specified as a RAW datatype; the corresponding field in the target Oracle table was also defined as RAW. The latter has been done to correspond with the VarBinary data type in which the DS reject output automatically comes.
The stored procedure stage is set to use the automatically generated procedure call, and contains one parameter, i.e. param1, that maps to the rejected column (reject output) and is defined as input. The error I'm getting in this scenario runs as follows:
APT_CombinedOperatorController,0: Fatal Error: Fatal: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to '<procedure name>' ORA-06550: line 1, column 7: PL/SQL: Statement ignored
2. When I generate procedure call manually in the stored procedure stage, thereby specifying the aformentioned param as:
BEGIN <procedure name>(#param1#); END;
I get following error:
Stored_Procedure_37,0: Error: ORA-01036: illegal variable name/number
3. When I change the binary data type to a varchar (in datastage -> input link -> "rejected" field, Oracle stored procedure & target table), I get following errors:
- APT_CombinedOperatorController,0: Fatal Error: Fatal: Must have an output link to declare this type of parameter(B or O).
- Trs_PROD_MAPPING,1: Fatal Error: waitForWriteSignal(): Premature EOF on node <server_name>No such file or directory
Anyone a clue on how to best achieve my goal, i.e. export the reject output via a stored procedure with a manually generated procedure?
Thanks in advance
Regards,
I wanted to create a stored procedure (within a parallel job) to write the reject output to a dedicated Oracle table by means of an Oracle stored procedure. Although the invoked procedure will eventually contain several parameters (the rerect outpuy being one of them), it has been stripped to a lean 1-argument procedure (to narrow down the conceivable error causes). I've tried this and that but did not get it working... Hereunder you'll find more details:
1. The stored procedure argument is specified as a RAW datatype; the corresponding field in the target Oracle table was also defined as RAW. The latter has been done to correspond with the VarBinary data type in which the DS reject output automatically comes.
The stored procedure stage is set to use the automatically generated procedure call, and contains one parameter, i.e. param1, that maps to the rejected column (reject output) and is defined as input. The error I'm getting in this scenario runs as follows:
APT_CombinedOperatorController,0: Fatal Error: Fatal: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to '<procedure name>' ORA-06550: line 1, column 7: PL/SQL: Statement ignored
2. When I generate procedure call manually in the stored procedure stage, thereby specifying the aformentioned param as:
BEGIN <procedure name>(#param1#); END;
I get following error:
Stored_Procedure_37,0: Error: ORA-01036: illegal variable name/number
3. When I change the binary data type to a varchar (in datastage -> input link -> "rejected" field, Oracle stored procedure & target table), I get following errors:
- APT_CombinedOperatorController,0: Fatal Error: Fatal: Must have an output link to declare this type of parameter(B or O).
- Trs_PROD_MAPPING,1: Fatal Error: waitForWriteSignal(): Premature EOF on node <server_name>No such file or directory
Anyone a clue on how to best achieve my goal, i.e. export the reject output via a stored procedure with a manually generated procedure?
Thanks in advance
Regards,