当前位置:网站首页>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;
边栏推荐
- 百度语音合成语音文件并在网站中展示
- 在两个有序数组中找到整体第K小的数可以做到O(log(Min(M,N)))
- SQL aggregate function handling null [easy to understand]
- uni-app集成极光推送插件后真机调试提示“当前运行的基座不包含原生插件[JG-JPush]...”问题的解决办法
- Matlab rounding
- 实验5 8254定时/计数器应用实验【微机原理】【实验】
- MySQL gets the primary key and table structure of the table
- 带马尔科夫切换的正向随机微分方程数值格式模拟
- 搜索二维矩阵[二分巧用 + 记录不同于插入二分的解法]
- excel 汉字转拼音「建议收藏」
猜你喜欢

谷歌浏览器控制台 f12怎么设置成中文/英文 切换方法,一定要看到最后!!!

void* 指针

创新药二级市场审饼疲劳:三期临床成功、产品获批也不管用了

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

Ideas and examples of divide and conquer

Bi-sql - different join
![Longest continuous sequence [diffusion method + space for time]](/img/db/7b0d1b0db7015e887340723505153a.png)
Longest continuous sequence [diffusion method + space for time]

Abnova丨CSV 磁珠中英文说明
![Experiment 5 8254 timing / counter application experiment [microcomputer principle] [experiment]](/img/e2/7da59a566e4ccb8e43f2a64c0420e7.png)
Experiment 5 8254 timing / counter application experiment [microcomputer principle] [experiment]
![全排列II[存在相同元素去重 + 标准回溯]](/img/d3/93ddb49e580be60be4f056f141b782.png)
全排列II[存在相同元素去重 + 标准回溯]
随机推荐
This national day! Tencent cloud wecity will accompany you to travel and light up the city landmark
天书夜读笔记——8.4 diskperf反汇编
[leetcode] 11. Container with the most water
‘distutils‘ has no attribute ‘version
搜索二维矩阵[二分巧用 + 记录不同于插入二分的解法]
Unity C # e-learning (VI) -- FTP (I)
Abnova丨5-甲基胞嘧啶多克隆抗体中英文说明
lnmp环境安装ffmpeg,并在Yii2中使用
动手学数据分析 数据建模和模型评估
Install mysql5.6 under linux64bit - the root password cannot be modified
音频PCM数据计算声音分贝值,实现简单VAD功能
(CVPR 2020) Learning Object Bounding Boxes for 3D Instance Segmentation on Point Clouds
Bi-sql - different join
Program.launch(xxx)打开文件
php easywechat 和 小程序 实现 长久订阅消息推送
AssertionError: CUDA unavailable, invalid device 0 requested
Bi-sql create
Chinese and English instructions of trypsin
How to prepare for the last day of tomorrow's exam? Complete compilation of the introduction to the second building test site
天书夜读笔记——内存分页机制