Page 1 of 1

Store Procedure Failure

Posted: Mon Feb 04, 2013 7:05 am
by fridge
Hi,

Have created a very simple Stored Procedure to hit a Terradta dbase on SQL Assistant V12. ON SQL Assistant the SP works fine when called.

I am no however trying to call from Datastage using the SP stage and get ...

'RDBMS code 5510: Invalid session mode for procedure execution'.

I assume I must be in a different session mode on DS as I am on SQl Assistant but am not sure how to check/amend this on either side.

Any help gratefully received.

Posted: Mon Feb 04, 2013 7:38 am
by chulett
Detail the settings you are using in the stage for us. Not sure if that will help but we may as well get as complete information here as we can.

You might also want to ask on a Teradata forum like this one to see what needs to be done in general to solve this.

Posted: Mon Feb 04, 2013 8:47 am
by fridge
The settings in the job are ...

procedure type = source
DB proc type = SP
Generate procedure call is checked

The SP itself is ...
CREATE PROCEDURE TEST1 (
OUT CduCin BIGINT
)

BEGIN
SELECT FIELD1 INTO CduCin FROM TABLE1
WHERE FIELD1 = 1;
END;

I have posted on the dbase side as well.

Thanks & Regards.

Posted: Mon Feb 04, 2013 9:19 am
by fridge
Seems the SP was created in a different session mode to what I had in the stage. Though now have a different error ...

RDBMS code 3514: User-generated transaction ABORT.