Home » SQL & PL/SQL » SQL & PL/SQL » finding the name of the current package.procedure
finding the name of the current package.procedure [message #41470] Mon, 06 January 2003 08:02 Go to next message
vikas
Messages: 29
Registered: November 2001
Junior Member
Hi ,

I m looking to add error handling where I can find out the procedure name of the erroneous procedure. It shld be something like

create or replace procedure my_proc

v_proc_name varchar2(30) ;
Begin
v_proc_name := SomeUtilityWhichGetsMeTheProcedureName;
.........
..........

Exception
WHEN OTHERS THEN
DBMS_OUTPUT.put_line ( v_proc_name ||' failed with message -->'||SQLERRM );
END;

Is there anyway I can find the proc name without having to hard-code it.

Many Thanks
Re: finding the name of the current package.procedure [message #41475 is a reply to message #41470] Mon, 06 January 2003 10:45 Go to previous messageGo to next message
Art Metzer
Messages: 2480
Registered: December 2002
Senior Member
To learn which procedure called you, or which procedure you are in, please see Tom Kyte's "Tidbits and How-To" link here.

Art
Re: finding the name of the current package.procedure [message #41478 is a reply to message #41475] Mon, 06 January 2003 11:02 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
Unfortunately, this approach does not work with packages (only the name of the package can be identified - not the procedure or function within the pacakge).
Previous Topic: Range question
Next Topic: Migration
Goto Forum:
  


Current Time: Sun Jun 09 14:31:45 CDT 2024