Re: Executing Procedures
From: Mark D Powell <Mark.Powell2_at_hp.com>
Date: Wed, 15 Feb 2012 07:59:15 -0800 (PST)
Message-ID: <53014fe7-715e-4e07-8b88-25c16ec16116_at_t5g2000yqk.googlegroups.com>
On Feb 15, 9:57 am, ExecMan <artme..._at_yahoo.com> wrote:
> Hi,
>
> We want to record into a table the owner of the procedure, who called
> it, and the name. So, when a procedure is executed how would I query
> the data dictionary to retrieve this information? I cannot find any
> code which tells me these 3 pieces of information.
>
> Regards
Date: Wed, 15 Feb 2012 07:59:15 -0800 (PST)
Message-ID: <53014fe7-715e-4e07-8b88-25c16ec16116_at_t5g2000yqk.googlegroups.com>
On Feb 15, 9:57 am, ExecMan <artme..._at_yahoo.com> wrote:
> Hi,
>
> We want to record into a table the owner of the procedure, who called
> it, and the name. So, when a procedure is executed how would I query
> the data dictionary to retrieve this information? I cannot find any
> code which tells me these 3 pieces of information.
>
> Regards
The built-in audit feature can produce a record of who called what procedure when if you audit execute; otherwise, I believe you would need to modify the procedures to log usage. Auditing must be turned on in advance.
You can find out within a procedure who called it via the call stack. Tom Kyte has published routines for getting this information:
http://tkyte.blogspot.com/2009/10/httpasktomoraclecomtkytewhocalledme.html
HTH -- Mark D Powell -- Received on Wed Feb 15 2012 - 09:59:15 CST