Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> v$session sql_address prev_sql_addr, cannot log previous sql-statement
Hallo,
I have a problem, given situation:
Trigger on table A works fine, except:
I want to log the sql-statement, which updates table A,
so I select:
select q.sql_text
from v_$session s ,v_$sql q
where s.audsid = userenv('SESSIONID')
and q.address = s.prev_sql_addr and q.hash_value = s.prev_hash_value;
Contents in table B.logged_sql_text is the statement of the
trigger : "insert into table B (logtable) .. bla",
not the update of table A:
"update A set ...".
As You can see above, I use *PREV*-addresses.
Modification of the trigger in triggerimg-time
with "after-" and "before-"update yields the same
result.
when I check prec_sql_addr (and hash) before and after
several statements (interactive in SQL*PLUS)
I see only a constant prev_sql_addr.
Where is the trick?
Thanks
Bernhard
Received on Fri Feb 08 2002 - 05:02:39 CST
![]() |
![]() |