RE: Getting the calling SQL statement in a PL/SQL function

Hi Glenn,

Does this help:
http://asktom.oracle.com/~tkyte/who_called_me/index.html
?

-Mark 


--
Mark J. Bobak
Senior Oracle Architect
ProQuest Information & Learning

"There are 10 types of people in the world:  Those who understand
binary, and those who don't."

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Glenn Stauffer
Sent: Thursday, January 12, 2006 11:44 AM
To: oracle-l@xxxxxxxxxxxxx
Subject: Getting the calling SQL statement in a PL/SQL function

A programmer here asked me whether there was a way for him, inside a
function, to obtain the SQL used to call the function.  He's tried
identifying the calling session and then looking into v$sqlarea to get
the sql executed by that session, but what shows there is the sql being
executed by his function.  Is there a good way to find the calling sql
with certainty?

Thanks,

Glenn
--
http://www.freelists.org/webpage/oracle-l


BEGIN:VCARD
VERSION:2.1
N:Bobak;Mark
FN:Bobak, Mark
ORG:ProQuest Information and Learning;Database Group
TITLE:Software Architect, Sr-TPD
TEL;WORK;VOICE:734.975.6086
ADR;WORK:;ECC4-N01E04;1400 Eisenhower Parkway
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:ECC4-N01E04=0D=0A1400 Eisenhower Parkway
EMAIL;PREF;INTERNET:Mark.Bobak@xxxxxxxxxxxxxxx
REV:20051213T223654Z
END:VCARD

Other related posts: