點擊上方“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
文章版權歸作者所有,未經允許請勿轉載,若此文章存在違規行為,您可以聯系管理員刪除。
轉載請注明本文地址:http://specialneedsforspecialkids.com/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...
閱讀 1347·2023-01-11 13:20
閱讀 1685·2023-01-11 13:20
閱讀 1133·2023-01-11 13:20
閱讀 1860·2023-01-11 13:20
閱讀 4101·2023-01-11 13:20
閱讀 2705·2023-01-11 13:20
閱讀 1386·2023-01-11 13:20
閱讀 3598·2023-01-11 13:20