Oracle PL / SQL Get package name

1

I have N Packetes with N Procedures, how can I get the name of the package that is executing the procedure, I know I can get the name of the procedure with $$ PLSQL_UNIT, but since I do the same but for the name of the package, this with the goal of putting together a string that has "NombrePackage.NombreProcedure"

Example, I have a PCKXYZ package with a procedure proc1, in the begin of the procedure proc1 I need some line that allows me to get the name of the package inside which is the procedure that I am executing, that is to say, return the name of the package PCKXYZ.

Thanks in advance and greetings to all.

    
asked by RSillerico 20.04.2017 в 21:35
source

2 answers

0

This can help you:

  

select NAME from all_source where       owner = 'YOUR_USER' and type = 'PACKAGE' AND TRIM (UPPER (TEXT)) LIKE 'PROCEDURE SEARCHED%';

    
answered by 21.04.2017 / 19:56
source
0

You can use the following command you can also use a like to do the search adding it

select procedure_name  from all_procedures

This other way tries  select procedure_name  from all_procedures  where owner = 'Tu'  and object_name = 'Package_Name'

    
answered by 20.04.2017 в 22:44