Re: Logging updates
From: Mark D Powell <Mark.Powell_at_eds.com>
Date: Thu, 5 Mar 2009 06:59:17 -0800 (PST)
Message-ID: <d29d6fdc-0acd-4a88-8aff-20cead9d9a56_at_r28g2000vbp.googlegroups.com>
On Mar 2, 1:02�pm, ame..._at_zacks.com wrote:
> Is it possible to create a trigger that will show me the following:
>
> Which user performed the update
> Who procedure performed the update
> The SQL string that was used.
>
> I can probably get the SQL from v$SQL. �But Who and What performed the
> update is a bit more complex I think.
>
> WHO_CALLED_ME is not really what will do the job here.....
>
> Thank you.
Date: Thu, 5 Mar 2009 06:59:17 -0800 (PST)
Message-ID: <d29d6fdc-0acd-4a88-8aff-20cead9d9a56_at_r28g2000vbp.googlegroups.com>
On Mar 2, 1:02�pm, ame..._at_zacks.com wrote:
> Is it possible to create a trigger that will show me the following:
>
> Which user performed the update
> Who procedure performed the update
> The SQL string that was used.
>
> I can probably get the SQL from v$SQL. �But Who and What performed the
> update is a bit more complex I think.
>
> WHO_CALLED_ME is not really what will do the job here.....
>
> Thank you.
There is no navtive feature that will give you what you are asking for without coding and Tom Kyte's WHO_CALLED_ME procedure is about as good as it gets.
The Oracle extended auditing feature available with 10g+ can also be used to capture the username, osuser, actual SQL statement for DML and DDL activity but it is not complete for your requirements.
A combination of auditing and who_called_me might be able to do what you want.
But the requirement is a little unrealistic. If you have the SQL statement, who and when, does it really matter where the SQL statement came from: stored procedure, trigger, JDBC, etc ....
HTH -- Mark D Powell -- Received on Thu Mar 05 2009 - 08:59:17 CST