1.找到存储过程被修改时的归档日志
SELECT NAME FROM V$ARCHIVED_LOG WHERE FIRST_TIME BETWEEN TO_DATE('20191118080000','YYYYMMDDHH24MISS') AND TO_DATE('20191118081000','YYYYMMDDHH24MISS');
2.使用logmnr
EXEC SYS.DBMS_LOGMNR.ADD_LOGFILE('/archlog/xxxxx.dbf');
EXEC SYS.DBMS_LOGMNR.START_LOGMNR(OPTIONS=>16);
SELECT * FROM V$LOGMNR_CONTENTS WHERE lower(TABLE_NAME)='source$'
exec SYS.DBMS_LOGMNR.END_LOGMNR;
3.如果要查是谁更改的,使用如下sql
如果用户的登录时间比较早,登录信息并未在你进行logmnr,OS_USERNAME和MACHINE_NAME是UNKNOW状态,此时可以结合V$ACTIVE_SESSION_HISTORY查询
从第二步找到SESSION_ID和SESSION_SERIAL#,使用如下语句查找
SELECT * FROM V$ACTIVE_SESSION_HISTORY WHERE SESSION_ID=27724 AND SESSION_SERIAL#= 62815;
手机扫一扫
移动阅读更方便
你可能感兴趣的文章