Tuesday, May 3, 2011

DML history in oracle 11g database

select * from dba_hist_active_sess_history

select t.instance_number,t.sample_time,t.sql_id,t.event,t.program,t.module,t.machine,s.sql_text
from dba_hist_active_sess_history t,dba_hist_sqltext s where t.sample_time >= to_timestamp('2011-04-27', 'yyyy-mm-dd')
and t.user_id = 408
and t.sql_id = s.sql_id
order by t.instance_number,t.snap_id,t.sample_id;

No comments: