当前位置:网站首页>LogMiner 数据库日志挖掘
LogMiner 数据库日志挖掘
2022-06-24 21:45:00 【51CTO】
--01.查看归档路径
select distinct name,first_time from v$archived_log where name is not null order by first_time;
--02.建立日志分析列表
begin
--sys.dbms_logmnr.add_logfile(logfilename=>'/home/oracle/archlog/xlstest1_arc_1_10506_1034075045.log',options=>dbms_logmnr.new);
--sys.dbms_logmnr.add_logfile(logfilename=>'/home/oracle/archlog/xlstest1_arc_1_10507_1034075045.log',options=>dbms_logmnr.addfile);
--sys.dbms_logmnr.add_logfile(logfilename=>'/home/oracle/archlog/xlstest1_arc_1_10508_1034075045.log',options=>dbms_logmnr.addfile);
--sys.dbms_logmnr.add_logfile(logfilename=>'/home/oracle/archlog/xlstest1_arc_1_10509_1034075045.log',options=>dbms_logmnr.addfile);
sys.dbms_logmnr.add_logfile(logfilename=>'+FRA/xlsdb/archivelog/2021_09_29/thread_2_seq_14704.1259.1084555009',options=>dbms_logmnr.new);
sys.dbms_logmnr.add_logfile(logfilename=>'+FRA/xlsdb/archivelog/2021_09_29/thread_2_seq_14705.1293.1084557151',options=>dbms_logmnr.addfile);
sys.dbms_logmnr.add_logfile(logfilename=>'+FRA/xlsdb/archivelog/2021_09_29/thread_2_seq_14706.729.1084559669',options=>dbms_logmnr.addfile);
end;
--03.启动分析
begin
sys.dbms_logmnr.start_logmnr(Options =>dbms_logmnr.dict_from_online_catalog);
end;
--04.查看日志分析结果
select username,scn,timestamp,sql_redo,sql_undo from v$logmnr_contents;
--根据表名及操作查询出语句及回滚SQL
select timestamp,sql_redo,sql_undo from v$logmnr_contents where table_name = 'T_USR_DEVICE' and operation = 'DELETE'
--05.关闭分析
begin
sys.dbms_logmnr.end_logmnr;
end;
边栏推荐
- Properties of DOM
- 门店无线音箱造假?索尼回应:产品预留了有线连接接口 复杂场景下可以使用
- Bi-sql create
- 搜索二维矩阵[二分巧用 + 记录不同于插入二分的解法]
- Full arrangement ii[duplicate removal of the same elements + standard backtracking]
- Search two-dimensional matrix [clever use of bisection + record solution different from inserting bisection]
- Abnova丨5-甲基胞嘧啶多克隆抗体中英文说明
- 脱氧核糖核酸酶I中英文说明书
- Cloud development technology summit · public welfare programming challenge [hot registration]!
- Abnova丨BSG 单克隆抗体中英文说明
猜你喜欢

Abnova丨BSG 单克隆抗体中英文说明

Google browser console F12 how to set the Chinese / English switching method, we must see the last!!!

Abnova丨CSV 磁珠中英文说明

AUTOCAD——两种延伸方式

Bi-sql Union

Assembly language (4) function transfer parameters

PMP考试“临门一脚”如何踢得漂亮?

Bi-sql index

论文翻译 | RandLA-Net: Efficient Semantic Segmentation of Large-Scale Point Clouds

Ideas and examples of divide and conquer
随机推荐
IPC mechanism
Abnova丨CSV 磁珠中英文说明
leetcode:2104. Subarray range and
‘distutils‘ has no attribute ‘version
Chinese and English instructions of Papain
JVM指令
门店无线音箱造假?索尼回应:产品预留了有线连接接口 复杂场景下可以使用
Merge sort template & understanding
AutoCAD - two extension modes
中金证券靠谱吗?开证券账户安全吗?
期望与方差
Full arrangement ii[duplicate removal of the same elements + standard backtracking]
Expectation and variance
"One good programmer is worth five ordinary programmers!"
Abnova丨5-甲基胞嘧啶多克隆抗体中英文说明
归并排序求逆序数
最长连续序列[扩散法+空间换时间]
Is CICC securities reliable? Is it safe to open a securities account?
搜索二维矩阵[二分巧用 + 记录不同于插入二分的解法]
Linux64Bit下安装MySQL5.6-不能修改root密码