Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to get PLS/SQL package/procedure/function name ?

Re: How to get PLS/SQL package/procedure/function name ?

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Tue, 21 Dec 2004 17:44:32 -0800
Message-ID: <41c8d07f$1_4@127.0.0.1>


MarekD wrote:

> Hay,
> Is it possible to get current package/procedure/function name from
> inside of PL/SQL package/procedure/function ???
> Greetings, M.D.

Directly ... no!

You can code it in like this:

DECLARE
  whoami VARCHAR2(20) := 'procname';
BEGIN
  .. your code here
END;
/

or you can use DBMS_APPLICATION_INFO.SET_MODULE and DBMS_APPLICATION_INFO.READ_MODULE. For a demo of these procs and related functionality: go to http://www.psoug.org
click on Morgan's Library
click on DBMS_APPLICATION_INFO.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)


-----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------
   http://www.newsfeed.com       The #1 Newsgroup Service in the World!
-----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =-----
Received on Tue Dec 21 2004 - 19:44:32 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US