Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


Gary_W
2018-09-05T14:54:05Z
Can someone point me to an example of calling an Oracle stored procedure that accepts a refcursor argument then processes the result set? I need to call it and write the result to a file.

I think I get the file part, writing using the value as {TASK(<sql task ID here>|Result.Parameter.Value|RC)} where RC is the procedure's refcursor argument. The problem is VC does not seem to like anything I put in as the value for the RC variable in the call to the stored procedure "wrong number or types of arguments in call". What should the parameter settings be for a input/output refcursor argument? There's no datatype setting of sys_refcursor either.

I can't find an example anywhere either. Thanks for any help.

FYI: A .net or powershell process that can execute the stored procedure and save as a file would be awesome as well.

EDIT 9/6/2018 I found a guide that helped me create a powershell script that got it working. see it here: Oracle database and powershell how-to . I'll be customizing it for our needs.
Sponsor
Forum information
Support
2018-09-14T14:50:17Z
Hi Gary,

sorry for the late reply. We do not have the test environment at the moment for Oracle. Was this resolved other way?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Gary_W
2018-09-14T14:55:19Z
Yes I have a generic powershell job now where I pass parameters and it dumps out the refcursor from a stored procedure to a file. I think this should be an official feature request though for VC to handle this and return results to standard out. What do you think?
Support
2018-09-14T15:29:12Z
Originally Posted by: Gary_W 

Yes I have a generic powershell job now where I pass parameters and it dumps out the refcursor from a stored procedure to a file. I think this should be an official feature request though for VC to handle this and return results to standard out. What do you think?



Yes, I will move this to forum Feature requests. Thanks
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Gary_W
2018-10-11T14:34:42Z
Update 10/11/2018 - If you call an Oracle stored procedure that has an OUT argument of a SYS_REFCURSOR from a SQL VC job, the output already goes to STDOUT of the task So I suppose this request could be cancelled as the result set could be processed using existing methods.

On the other hand, it still would be useful to use as originally requested as input to a file write task or something without having to fill up memory with the output first. My concern is that the output I want to write out could be huge and I would not want to read the entire thing into memory before writing out.

Thanks
Scroll to Top