OciDescribeAny on procedure in package gives error ORA-04043 [message #684495] |
Tue, 15 June 2021 00:36 |
|
ovri
Messages: 4 Registered: June 2021
|
Junior Member |
|
|
I use OCI 19.11 (also tried 12.2), Oracle instant client light 32-bit with Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production.
I am trying to run OciDescribeAny on an procedure in a package. The object name is of the form <package>.<procedure>. The resulting error is ORA-04043: object <package>.<procedure> does not exist.
And yes: The procedure does exist in the database, and can be listed using sql plus.
The call is:
OCIDescribeAny(fdptr->svchp, fdptr->errhp, (void *)objnam, (ub4) strnlen((const char *)objnam, OSIZE-1), (ub1)OCI_OTYPE_NAME, (ub1)OCI_DEFAULT, (ub1) OCI_PTYPE_PROC, dschp);
I am in the process of upgrading from ORA7 and ORA8 to ORA12 OCI calls. This worked in the past using odessp from ORA7.
Is a new approach required with OciDescribeAny? Is there any example of this somewhere?
|
|
|
|
|
|
|
|
Re: OciDescribeAny on procedure in package gives error ORA-04043 [message #684667 is a reply to message #684666] |
Mon, 19 July 2021 01:52 |
|
ovri
Messages: 4 Registered: June 2021
|
Junior Member |
|
|
I tried that too, without any luck.
I gave up on this approach, and I am not sure how well it would work with overloaded procedures anyway. The old odessp call would return information for all instances of the procedure (or function), while I think OciDescribeAny could only return a handle to one instance anyway? I would be interested to hear if somebody has experience with this.
I had more luck with a nested approach, where I run OciDescribeAny on the package, then get a list of all procedures. I then go through the list and do a string compare with the procedure name, and get a handle to each matching procedure. From these I can get all the information I need about the procedure instances, and build output that mimics the odessp output. I have not figured out how to differentiate between functions and procedures, but luckily I only need procedures.
Supplementary information and information about alternate approaches is welcome. Thank you for your help, Neve - the ideas for the alternate approach came to me while trying out your suggestions
|
|
|