Home » SQL & PL/SQL » SQL & PL/SQL » retrieving procedure name
retrieving procedure name [message #335735] Wed, 23 July 2008 07:59 Go to next message
ducasio
Messages: 38
Registered: November 2003
Member
hi everybody,

maybe the question i do is bothering for you but i have this problem: i have a pl/sql which is named 'MY_PROC'. What code should i write inside of the procedure(PL/SQL) to get the procedure name into a variable during runtime? i do not like to write
var_pr_name := 'MY_PROC';

thanks in advance,
ducasio
Re: retrieving procedure name [message #335738 is a reply to message #335735] Wed, 23 July 2008 08:04 Go to previous messageGo to next message
ora_2007
Messages: 430
Registered: July 2007
Location: Mumbai
Senior Member
DBA_OBJECTS/USER_OBJECTS view may help to get the Procedure_name.
Re: retrieving procedure name [message #335740 is a reply to message #335735] Wed, 23 July 2008 08:08 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Maybe is it this one you're searching for:
SQL> create or replace procedure my_proc is
  2  begin
  3    dbms_output.put_line ($$PLSQL_UNIT);
  4  end;
  5  /

Procedure created.

SQL> exec my_proc
MY_PROC

PL/SQL procedure successfully completed.

Regards
Michel

[Updated on: Wed, 23 July 2008 08:09]

Report message to a moderator

Re: retrieving procedure name [message #335745 is a reply to message #335735] Wed, 23 July 2008 08:21 Go to previous message
ducasio
Messages: 38
Registered: November 2003
Member
yes michel,
it is exactly what i was asking for.

many thanks,
ducasio
Previous Topic: Oracle/PL/SQL runtime errors.
Next Topic: difference between these queries
Goto Forum:
  


Current Time: Sat Dec 10 22:13:27 CST 2016

Total time taken to generate the page: 0.07137 seconds