点击上方“IT那活儿”公众号,关注后了解更多内容,不管IT什么活儿,干就完了!!!
SYS@PROD5 >archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 36
Next log sequence to archive 38
Current log sequence 38
create table zhangyun.t5(id number,name varchar2(2000));
insert into zhangyun.t5 values(1,zhangyun);
insert into zhangyun.t5 values(2,zhangsan);
commit;
SYS@PROD5 >alter system switch logfile;
System altered.
SYS@PROD5 >alter session set nls_date_format=yyyy-mm-dd hh24:mi:ss;
Session altered.
SYS@PROD5 >col name for a50
SYS@PROD5 >select recid, name, first_time from v$archived_log;
RECID NAME FIRST_TIME
---------- -------------------------------------------------- -------------------
33 /u01/app/oracle/fast_recovery_area/PROD5H1/archive 2022-10-16 15:59:56
log/2022_10_16/o1_mf_1_38_knqgprtt_.arc
select name,first_time,next_time from v$archived_log where
first_time>=to_date(2007-01-19 08:00:00,yyyy-mm-dd hh24:mi:ss);
关于dbms_logmnr.add_logfile包的Options选项:
exec dbms_logmnr.add_logfile(logfilename=>/u01/app/oracle/fast_r
ecovery_area/PROD5H1/archivelog/2022_10_16/o1_mf_1_39_knqhjygx_.arc,options=> dbms_logmnr.new);
exec dbms_logmnr.add_logfile(logfilename=>/u01/app/oracle/fast_r
ecovery_area/PROD5H1/archivelog/2022_10_16/o1_mf_1_40_knqhjygx_.arc,options=> dbms_logmnr.addfile);
SYS@PROD5 >exec dbms_logmnr.add_logfile(logfilename=>/u01/app/oracle/fast_r
ecovery_area/PROD5H1/archivelog/2022_10_16/o1_mf_1_38_knqgpr
tt_.arc,options=> dbms_logmnr.new);
PL/SQL procedure successfully completed.
SYS@PROD5 >select filename from v$logmnr_logs;
FILENAME
-----------------------------------------------------------------
/u01/app/oracle/fast_recovery_area/PROD5H1/archivelog/2022_10_16/o1_mf_1_38_knqgprtt_.arc
关于dbms_logmnr.start_logmnr包的Options选项,本次使用以下2个:
exec
dbms_logmnr.start_logmnr(options=>dbms_logmnr.dict_from_online_catalog + dbms_logmnr.committed_data_only);
SYS@PROD5 >select scn,username,substr(sql_redo,1,60)
sub_sql_redo from v$logmnr_contents where
seg_owner=ZHANGYUN and lower(sql_redo) like %insert%;
SCN USERNAME
---------- ------------------------------
SUB_SQL_REDO
-----------------------------------------------------------------
2635927 UNKNOWN
insert into "ZHANGYUN"."T5"("ID","NAME") values (1,zhangy
2635928 UNKNOWN
insert into "ZHANGYUN"."T5"("ID","NAME") values (2,zhangs
ZHANGYUN@PROD5 >insert into zhangyun.t5 values(5,zhangli);
1 row created.
ZHANGYUN@PROD5 >commit;
Commit complete.
ZHANGYUN@PROD5 >archive log list
ORA-01031: insufficient privileges
ZHANGYUN@PROD5 >conn / as sysdba
Connected.
SYS@PROD5 >archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 37
Next log sequence to archive 39
Current log sequence 39
SYS@PROD5 >alter system switch logfile;
System altered.
SYS@PROD5 >exec dbms_logmnr.add_logfile(logfilename=>/u01/app/oracle/fast_recovery_area/PROD5H1/archivelog/2022_10_16/o1_mf_1_39_knqhjygx_.arc,options=> dbms_logmnr.new);
PL/SQL procedure successfully completed.
SYS@PROD5 >exec dbms_logmnr.start_logmnr(options=>dbms_logmnr.dict_from_online_catalog + dbms_logmnr.committed_data_only);
PL/SQL procedure successfully completed.
SYS@PROD5 >select scn,username,substr(sql_redo,1,60) sub_sql_redo from v$logmnr_contents where seg_owner=ZHANGYUN and lower(sql_redo) like %insert%;
SCN USERNAME
---------- ------------------------------
SUB_SQL_REDO
-----------------------------------------------------------------
2638100 ZHANGYUN
insert into "ZHANGYUN"."T5"("ID","NAME") values (5,zhangl
文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。
转载请注明本文地址:https://www.ucloud.cn/yun/129192.html
OGG Integrated Native DDL简单测试 img{ display:block; margin:0 auto !important; width:100%; } body{ width:75%;...
摘要:大数据架构设计阶段分布式。大数据数据采集阶段。大数据,或称巨量资料,指的是需要新处理模式才能具有更强的决策力洞察力和流程优化能力的海量高增长率和多样化的信息资产。大数据的特点大量高速多样价值密度真实性。基础阶段:Linux、Docker、KVM、MySQL基础、Oracle基础、MongoDB、redis。hadoop mapreduce hdfs yarn:hadoop大数据存储阶段:hb...
阅读 1346·2023-01-11 13:20
阅读 1684·2023-01-11 13:20
阅读 1132·2023-01-11 13:20
阅读 1860·2023-01-11 13:20
阅读 4100·2023-01-11 13:20
阅读 2704·2023-01-11 13:20
阅读 1385·2023-01-11 13:20
阅读 3597·2023-01-11 13:20