Stored Proc. error Invalid Cursor state

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
srikanthd1978
Charter Member
Charter Member
Posts: 38
Joined: Wed Mar 17, 2004 1:16 am
Location: USA

Stored Proc. error Invalid Cursor state

Post by srikanthd1978 »

hi all,

I am trying to execute a Stored Proc using a SP stage/operator in a PX Job.

My Job Design is ..Seq File -> Transformer -> SP Stage -> Seq file.

The Source sequential file contains input to the SP. In the XFM i hard code the 2 output params that i have to use to call the stored proc..

When i pass one record, the SP gets executed successfully..

However when i pass multiple records and check the option ( Execute SP for each row )..my job aborts with the following error..

Fatal Error: Fatal: [IBM][CLI Driver] CLI0115E Invalid cursor state. SQLSTATE=24000

has anyone encountered this issue...when i dug more into this error..i have reasons like .."the Cursor is already opened or the Cursor is not opened.."...

Is this an issue with the Stored Procedure itself or something to do with the SP opertor/stage in datastage..

( We should be able to pass multiple records as inputs and should be able to get results from the Stored proc )..i dont know why this error appears..

all help is appreciated..

Thanks
..i did not invent many things..but i can make them Better..
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Try changing array size and transcation size to 1. So that you can force record to flow one after other, rather that caching it up.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
srikanthd1978
Charter Member
Charter Member
Posts: 38
Joined: Wed Mar 17, 2004 1:16 am
Location: USA

Post by srikanthd1978 »

Thanks Kumar for the quick response...

I tried setting the Transaction Size = 1 ( could not find the option for array Size).. when i run the Job i get the following error and the job aborts...

Stored_Procedure_14: [IBM][CLI Driver] CLI0125E Function sequence error. SQLSTATE=HY010
[IBM][CLI Driver] CLI0125E Function sequence error. SQLSTATE=HY010


any ideas ??
..i did not invent many things..but i can make them Better..
Post Reply