2020-09-21

oracle中查找某用户执行某张表的操作操作记录

 

 

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;

原文转载:http://www.shaoqun.com/a/476470.html

asiabill:https://www.ikjzd.com/w/1014
笨鸟海淘:https://www.ikjzd.com/w/1550
苹果开始了!考虑将15%-30%的硬件产能从中国转移出去:https://www.ikjzd.com/home/98723
新手入!亚马逊店铺注册要注意的8个细节:https://www.ikjzd.com/home/22638
亚马逊翻新listing的2种套路:https://www.ikjzd.com/home/59673

1,首先查找表的操作记录select*fromv$sqlareaawherea.SQL_TEXTlike'%TB_ACCT_SYSDATE%';2,从上面的记录中找到update语句对应的sql_idselect*fromv$sqltexta,v$sqlareabwherea.SQL_ID=b.SQL_IDandb.SQL_IDin('cq53826tk4u3c',
kk馆:https://www.ikjzd.com/w/1713
易佰:https://www.ikjzd.com/w/1482
如何避免亚马逊促销叠加?叠加促销亏损后该采取什么措施?:https://www.ikjzd.com/home/108395
预警!新兴市场现货币崩盘危机,出口须谨慎!:https://www.ikjzd.com/home/99205
为商家提供独立站建站工具,跨境支付企业转型成潮流?:https://www.ikjzd.com/home/90794

No comments:

Post a Comment