1,首先查找表的操作记录
select * from v$sqlarea a where a.SQL_TEXT like \’%TB_ACCT_SYSDATE%\’;
2,从上面的记录中找到update语句对应的sql_id
select * from v$sqltext a,v$sqlarea b where a.SQL_ID=b.SQL_ID and b.SQL_ID in(\’cq53826tk4u3c\’,\’afftnrfhu5utk\’) order by b.LAST_ACTIVE_TIME desc;
3,从上面的记录中找到最新的sql操作记录,然后找到用户名和主机
select * from sys.v_$session l,sys.v_$sql s where s.SQL_ID=\’cq53826tk4u3c\’ and l.USERNAME is not null;
select *
from sys.v_$session l, sys.v_$sql s
where s.SQL_ID in
(select distinct a.SQL_ID
from v$sqltext a, v$sqlarea b
where a.SQL_ID = b.SQL_ID
and b.SQL_ID in (select sql_id
from v$sqlarea a
where a.SQL_TEXT like \’%jhmmm.jhmmm_recall%\’))
and l.USERNAME is not null;