暂无图片
暂无图片
暂无图片
暂无图片
暂无图片
Oracle体系结构--LogMiner
945
2页
5次
2020-04-26
5墨值下载
Oracle体系结构--LogMiner
作用:获得Oracle重做日志文件(归档日志文件)中的具体内容
1、查看是否归档(如果未归档则开启归档)
未归档则启动数据库到mount状态开启归档
2、查询当前日志组
3、模拟业务用户插入操作
4、归档日志切换
5、查看当前日志组
6、模拟业务用户删除操作
archiveloglist;
startupmount
alterdatabasearchivelog;
select*fromv$log;
createtablescott.t2(idnumber(10));
insertintoscott.t2selectscott.emp.empnofromscott.emp;
commit;
altersystemarchivelogcurrent;
select*fromv$log;
deletefromscott.t2wherescott.t2.id<7900;
commit;
1
1
2
1
1
2
3
1
1
1
2
7、归档日志切换
8、查看归档日志文件
9、使用LogMiner分析归档日志
10、执行LogMiner分析
11、查询分析结果
12、关闭日志分析
altersystemarchivelogcurrent;
selectnamefromv$archived_log;
executedbms_logmnr.add_logfile(logfilename=>
'/u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch1_11_946762872.dbf',options=>
dbms_logmnr.addfile);
execute
dbms_logmnr.start_logmnr(options=>dbms_logmnr.dict_from_online_catalog);
colusernamefora10;
colsql_redofora60;
selectusername,scn,to_char(timestamp,'yyyy‐mm‐ddhh24:mi:ss'),sql_redofrom
v$logmnr_contentswhereseg_name='SCOTT.T2';
executedbms_logmnr.end_logmnr;
1
1
1
1
1
2
3
1
of 2
5墨值下载
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文档的来源(墨天轮),文档链接,文档作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论

关注
最新上传
暂无内容,敬请期待...
下载排行榜
Top250 周榜 月榜