Question
5
Replies
280
Views
Posted: December 28, 2015
Last activity: January 11, 2016
Is there a way to close Stored Prod cursor from Connect-SQL rule?
Is there a way to close Stored Prod cursor from Connect-SQL rule?We are calling a partner system stored proc which is passing us values via cursor parameter.
We need to close this cursor,so that open cursor count does not reach threshold
Hi Shyam,
If you know the name of cursor, you can try closing the cursor as CLOSE <cursor_name> in 'save' tab of Connect-SQL rule and call it in the activity with 'RDB-Save' method.
You can define a block as below in 'Save' tab of Connect-SQL rule and call it in the activity with 'RDB-Save' method, the block should fetch the cursor and close it.
DECLARE
mycursor SYS_REFCURSOR;
BEGIN
mycursor := <YOUR_PROCEDURE> -- Getting the cursor from the procedure
CLOSE mycursor; -- Closing the global cursor returned from the precedure
END;
Thanks,
Habeeb Baig