• <legend id='IBJ9S'><style id='IBJ9S'><dir id='IBJ9S'><q id='IBJ9S'></q></dir></style></legend>

    <small id='IBJ9S'></small><noframes id='IBJ9S'>

      • <bdo id='IBJ9S'></bdo><ul id='IBJ9S'></ul>
      <tfoot id='IBJ9S'></tfoot>

        <i id='IBJ9S'><tr id='IBJ9S'><dt id='IBJ9S'><q id='IBJ9S'><span id='IBJ9S'><b id='IBJ9S'><form id='IBJ9S'><ins id='IBJ9S'></ins><ul id='IBJ9S'></ul><sub id='IBJ9S'></sub></form><legend id='IBJ9S'></legend><bdo id='IBJ9S'><pre id='IBJ9S'><center id='IBJ9S'></center></pre></bdo></b><th id='IBJ9S'></th></span></q></dt></tr></i><div id='IBJ9S'><tfoot id='IBJ9S'></tfoot><dl id='IBJ9S'><fieldset id='IBJ9S'></fieldset></dl></div>

        在 Oracle PL/SQL 中获取调用过程或函数的名称

        时间:2023-11-02

          <small id='6Ygxp'></small><noframes id='6Ygxp'>

        1. <legend id='6Ygxp'><style id='6Ygxp'><dir id='6Ygxp'><q id='6Ygxp'></q></dir></style></legend>
            <bdo id='6Ygxp'></bdo><ul id='6Ygxp'></ul>
            <tfoot id='6Ygxp'></tfoot>
              • <i id='6Ygxp'><tr id='6Ygxp'><dt id='6Ygxp'><q id='6Ygxp'><span id='6Ygxp'><b id='6Ygxp'><form id='6Ygxp'><ins id='6Ygxp'></ins><ul id='6Ygxp'></ul><sub id='6Ygxp'></sub></form><legend id='6Ygxp'></legend><bdo id='6Ygxp'><pre id='6Ygxp'><center id='6Ygxp'></center></pre></bdo></b><th id='6Ygxp'></th></span></q></dt></tr></i><div id='6Ygxp'><tfoot id='6Ygxp'></tfoot><dl id='6Ygxp'><fieldset id='6Ygxp'></fieldset></dl></div>
                  <tbody id='6Ygxp'></tbody>

                • 本文介绍了在 Oracle PL/SQL 中获取调用过程或函数的名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  有谁知道 PL/SQL 过程(在本例中为错误记录过程)是否有可能获得调用它的函数/过程的名称?

                  Does anyone know whether it's possible for a PL/SQL procedure (an error-logging one in this case) to get the name of the function/procedure which called it?

                  显然我可以将名称作为参数传入,但是进行系统调用或其他方式来获取信息会很好-如果不是从过程/函数中调用,它可以只返回 null 或其他内容.

                  Obviously I could pass the name in as a parameter, but it'd be nice to make a system call or something to get the info - it could just return null or something if it wasn't called from a procedure/function.

                  如果没有这方面的方法,那很好 - 只是好奇是否有可能(搜索一无所获).

                  If there's no method for this that's fine - just curious if it's possible (searches yield nothing).

                  推荐答案

                  有一个名为 OWA_UTIL 的包(在旧版本的数据库中默认不安装).这有一个方法 WHO_CALLED_ME() 返回 OWNER、OBJECT_NAME、LINE_NO 和 CALLER_TYPE.请注意,如果调用者是一个打包过程,它将返回 PACKAGE 名称而不是过程名称.在这种情况下,无法获得过程名称;这是因为过程名可以重载,所以不一定很有用.

                  There is a package called OWA_UTIL (which is not installed by default in older versions of the database). This has a method WHO_CALLED_ME() which returns the OWNER, OBJECT_NAME, LINE_NO and CALLER_TYPE. Note that if the caller is a packaged procedure it will return the PACKAGE name not the procedure name. In this case there is no way of getting the procedure name; this is because the procedure name can be overloaded, so it's not necessarily very useful.

                  了解更多信息.

                  从 10gR2 开始,还有 $$PLSQL_UNIT 特殊功能;这也将返回 OBJECT NAME(即包不是打包过程).

                  Since 10gR2 there is also the $$PLSQL_UNIT special function; this will also return the OBJECT NAME (i.e. package not packaged procedure).

                  这篇关于在 Oracle PL/SQL 中获取调用过程或函数的名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:我怎样才能创建一个“动态"的?WHERE 子句? 下一篇:在 Oracle 中删除大量数据

                  相关文章

                • <legend id='NLwGw'><style id='NLwGw'><dir id='NLwGw'><q id='NLwGw'></q></dir></style></legend>
                    <bdo id='NLwGw'></bdo><ul id='NLwGw'></ul>
                • <tfoot id='NLwGw'></tfoot>

                    1. <i id='NLwGw'><tr id='NLwGw'><dt id='NLwGw'><q id='NLwGw'><span id='NLwGw'><b id='NLwGw'><form id='NLwGw'><ins id='NLwGw'></ins><ul id='NLwGw'></ul><sub id='NLwGw'></sub></form><legend id='NLwGw'></legend><bdo id='NLwGw'><pre id='NLwGw'><center id='NLwGw'></center></pre></bdo></b><th id='NLwGw'></th></span></q></dt></tr></i><div id='NLwGw'><tfoot id='NLwGw'></tfoot><dl id='NLwGw'><fieldset id='NLwGw'></fieldset></dl></div>

                      <small id='NLwGw'></small><noframes id='NLwGw'>