0

如何使用Oracle.ManagedDataAccess.Client(or Oracle.DataAccess.Client) 读取给定包中的存储过程接口(签名),以便推断所需的参数、它们的类型/长度以及它们是INOUT还是两者兼而有之?

示例:鉴于我正在寻找以somePackage.someProc最容易使用的格式返回该 proc 的定义(而不是正文)。

4

1 回答 1

1

All relevant information about procedure/function parameters is located in the metadata view ALL_ARGUMENTS.

For example:

SQL> CREATE PACKAGE somePackage AS
  2     PROCEDURE someProc (p_arg1 NUMBER, p_arg2 OUT VARCHAR2);
  3  END;
  4  /

Package created

SQL> SELECT package_name, object_name, position, argument_name, data_type, in_out
  2    FROM user_arguments
  3   WHERE package_name='SOMEPACKAGE';

PACKAGE_NAME  OBJECT_NAME   POSITION ARGUMENT_NAME  DATA_TYPE  IN_OUT
------------- ------------ --------- -------------- ---------- ---------
SOMEPACKAGE   SOMEPROC             1 P_ARG1         NUMBER     IN
SOMEPACKAGE   SOMEPROC             2 P_ARG2         VARCHAR2   OUT
于 2013-09-03T08:10:11.443 回答