Re: Logging updates

From: Mark D Powell <>
Date: Thu, 5 Mar 2009 06:59:17 -0800 (PST)
Message-ID: <>

On Mar 2, 1:02 pm, 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

Original text of this message