Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Capturing SQL
Hello,
I need to create auditing of sorts: track certain changes to a certain column - who /what is changing it. I also need to capture the SQL update statement that did it.
So I created a holding table and a trigger that would populate the holding table on update to the column in question. I've tried to capture the SQL using:
select t2.sql_text
from sys.v_$session t1, sys.v_$sqltext t2
where t1.audsid = userenv('sessionid')
and t2.address = t1.prev_sql_addr
and t2.hash_value = t1.prev_hash_value
order by t2.piece
It does not work - always brings the generic 'update ts$ set inc#=:2 where ts#=:1'
Any suggestions?
Andrew A.
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Dec 01 2000 - 14:58:37 CST