dbTalk Databases Forums  

Logging updates

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Logging updates in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
amerar@zacks.com
 
Posts: n/a

Default Logging updates - 03-02-2009 , 12:02 PM







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.

Reply With Quote
  #2  
Old   
Michael Austin
 
Posts: n/a

Default Re: Logging updates - 03-02-2009 , 02:11 PM






amerar (AT) zacks (DOT) com wrote:
Quote:
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.

Yes- mostly...
hint: v$session.


Quote:
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.

Reply With Quote
  #3  
Old   
Mark D Powell
 
Posts: n/a

Default Re: Logging updates - 03-05-2009 , 08:59 AM



On Mar 2, 1:02*pm, ame... (AT) zacks (DOT) com wrote:
Quote:
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 --


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.