17.5 About Debugging External Procedures
Usually, when an external procedure fails, its C prototype is faulty.
That is, the prototype does not match the one generated internally by PL/SQL. This can happen if you specify an incompatible C data type. For example, to pass an OUT
parameter of type REAL
, you must specify float
*
. Specifying float
, double
*
, or any other C data type results in a mismatch.
In such cases, you get a lost
RPC
connection
to
external
procedure
agent
error, which means that agent extproc
terminated abnormally because the external procedure caused a core dump.
Topics:
- Using Package DEBUG_EXTPROC
To help you debug external procedures, PL/SQL provides the utility packageDEBUG_
EXTPROC
.
See Also:
Oracle Database Data Cartridge Developer's Guide. for information on how to avoid errors when declaring C prototype parameters17.5.1 Using Package DEBUG_EXTPROC
To help you debug external procedures, PL/SQL provides the utility package DEBUG_
EXTPROC
.
To install the package, run the script dbgextp.sql
, which you can find in the PL/SQL demo directory.
To use the package, follow instructions in dbgextp.sql
. Your Oracle Database account must have EXECUTE
privileges on the package and CREATE
LIBRARY
privileges.
To debug external procedures: