Sorry, read your request a total different way! :-) You should be able to use the dba_dependencies view to do this. Will not have line numbers though. Here is a link to a post by Jared Still on this with a script - http://ss64.com/ora/sql-dependencies.html jbj2 -- Jamey Johnston On Apr 20, 2011, at 4:14 PM, "Lange, Kevin G" <kevin.lange@xxxxxxxxxx> wrote: > Was looking more for something that could be called from a procedure that > would give the names of the procedures/packages from the current procedure on > down. > > For example, if I have a procedure that is called X and it calls a procedure > called Y which calls a procedure called Z, the dbms_utility function returns > something like this when called from procedure Z: > > > FORMAT_CALL_STACK > -------------------------------------------------------------------------------- > ----- PL/SQL Call Stack ----- > object line object > handle number name > 38ab66d13 4 procedure Z > 38da54a34 5 procedure Y > 38da33a22 2 procedure X > 38da59f28 1 anonymous block > Its one long line but it is parsable on character 10. I can parse it but > would prefer having something that might return simular data in an array or > table or something simpler. > > From: Jamey Johnston [mailto:jj@xxxxxxxxxx] > Sent: Wednesday, April 20, 2011 3:42 PM > To: Lange, Kevin G > Cc: <oracle-l@xxxxxxxxxxxxx> > Subject: Re: Parsing the Call Stack > > pstack <spid> > > > > > jbj2 > > -- > > Jamey Johnston > > On Apr 20, 2011, at 2:52 PM, "Lange, Kevin G" <kevin.lange@xxxxxxxxxx> wrote: > >> Howdy All; >> Does anyone know an easier way to retrieve the Program Call Stack other >> than parsing the output string from dbms_utility.format_call_stack ? We >> have a developer who would like to know where his code is being called from >> for debugging/logging purposes. >> >> We are using Oracle 10g (lowest version 10.2.0.3) on Solaris 10g. >> >> Thanks >> >> Kevin >> >> >> This e-mail, including attachments, may include confidential and/or >> proprietary information, and may be used only by the person or entity >> to which it is addressed. If the reader of this e-mail is not the intended >> recipient or his or her authorized agent, the reader is hereby notified >> that any dissemination, distribution or copying of this e-mail is >> prohibited. If you have received this e-mail in error, please notify the >> sender by replying to this message and delete this e-mail immediately. > > This e-mail, including attachments, may include confidential and/or > proprietary information, and may be used only by the person or entity > to which it is addressed. If the reader of this e-mail is not the intended > recipient or his or her authorized agent, the reader is hereby notified > that any dissemination, distribution or copying of this e-mail is > prohibited. If you have received this e-mail in error, please notify the > sender by replying to this message and delete this e-mail immediately.