logmnr挖掘中間有DDL的操作示例-對於執行DDL前的操作無法挖掘
對於執行DDL前的操作無法挖掘,但是不報錯。只顯示DDL語句及DDL之後的DML操作。
更多logmnr挖掘DML操作,詳見:使用logmnr使用logmnr對其它使用者的操作執行日誌挖掘的四個對比實驗
BYS@ bys3>select dbms_flashback.get_system_change_number from dual;
GET_SYSTEM_CHANGE_NUMBER
------------------------
3517212
BYS@ bys3>select * from test;
OBJECT_NAME STATUS
------------ -------
11 22
10 15
10 15
BYS@ bys3>delete test where status=22;
1 row deleted.
BYS@ bys3>commit;
Commit complete.
BYS@ bys3>truncate table test;
Table truncated.
BYS@ bys3>insert into test values(9,888);
1 row created.
BYS@ bys3>commit;
Commit complete.
BYS@ bys3>select * from test;
OBJECT_NAME STATUS
------------ -------
9 888
BYS@ bys3>select dbms_flashback.get_system_change_number from dual;
GET_SYSTEM_CHANGE_NUMBER
------------------------
3517265
#############LOGMNR進行挖掘:--只看到DDL語句及之後的DML。
BYS@ bys3>col member for a30
BYS@ bys3>select a.group#,a.member,b.status from v$logfile a,v$log b where a.group#=b.group#;
GROUP# MEMBER STATUS
---------- ------------------------------ ----------------
1 /u01/oradata/bys3/redo01.log INACTIVE
2 /u01/oradata/bys3/redo02.log CURRENT
3 /u01/oradata/bys3/redo03.log INACTIVE
BYS@ bys3>execute dbms_logmnr.add_logfile(LogFileName => '/u01/oradata/bys3/redo02.log',Options => dbms_logmnr.new);
PL/SQL procedure successfully completed.
BYS@ bys3>execute dbms_logmnr.start_logmnr(options =>dbms_logmnr.dict_from_online_catalog,startscn =>3517212,endscn =>3517265);
PL/SQL procedure successfully completed.
BYS@ bys3>col sql_undo for a60
BYS@ bys3>col sql_redo for a60
BYS@ bys3>set linesize 200
BYS@ bys3>col operation for a15
BYS@ bys3>select operation,sql_redo,sql_undo from v$logmnr_contents where table_name='TEST';
OPERATION SQL_REDO SQL_UNDO
--------------- ------------------------------------------------------------ ------------------------------------------------------------
DDL truncate table test;
INSERT insert into "BYS"."TEST"("OBJECT_NAME","STATUS") values ('9' delete from "BYS"."TEST" where "OBJECT_NAME" = '9' and "STAT
,'888'); US" = '888' and ROWID = 'AAAFdlAAEAAAAD1AAA';
更多logmnr挖掘DML操作,詳見:使用logmnr使用logmnr對其它使用者的操作執行日誌挖掘的四個對比實驗
BYS@ bys3>select dbms_flashback.get_system_change_number from dual;
GET_SYSTEM_CHANGE_NUMBER
------------------------
3517212
BYS@ bys3>select * from test;
OBJECT_NAME STATUS
------------ -------
11 22
10 15
10 15
BYS@ bys3>delete test where status=22;
1 row deleted.
BYS@ bys3>commit;
Commit complete.
BYS@ bys3>truncate table test;
Table truncated.
BYS@ bys3>insert into test values(9,888);
1 row created.
BYS@ bys3>commit;
Commit complete.
BYS@ bys3>select * from test;
OBJECT_NAME STATUS
------------ -------
9 888
BYS@ bys3>select dbms_flashback.get_system_change_number from dual;
GET_SYSTEM_CHANGE_NUMBER
------------------------
3517265
#############LOGMNR進行挖掘:--只看到DDL語句及之後的DML。
BYS@ bys3>col member for a30
BYS@ bys3>select a.group#,a.member,b.status from v$logfile a,v$log b where a.group#=b.group#;
GROUP# MEMBER STATUS
---------- ------------------------------ ----------------
1 /u01/oradata/bys3/redo01.log INACTIVE
2 /u01/oradata/bys3/redo02.log CURRENT
3 /u01/oradata/bys3/redo03.log INACTIVE
BYS@ bys3>execute dbms_logmnr.add_logfile(LogFileName => '/u01/oradata/bys3/redo02.log',Options => dbms_logmnr.new);
PL/SQL procedure successfully completed.
BYS@ bys3>execute dbms_logmnr.start_logmnr(options =>dbms_logmnr.dict_from_online_catalog,startscn =>3517212,endscn =>3517265);
PL/SQL procedure successfully completed.
BYS@ bys3>col sql_undo for a60
BYS@ bys3>col sql_redo for a60
BYS@ bys3>set linesize 200
BYS@ bys3>col operation for a15
BYS@ bys3>select operation,sql_redo,sql_undo from v$logmnr_contents where table_name='TEST';
OPERATION SQL_REDO SQL_UNDO
--------------- ------------------------------------------------------------ ------------------------------------------------------------
DDL truncate table test;
INSERT insert into "BYS"."TEST"("OBJECT_NAME","STATUS") values ('9' delete from "BYS"."TEST" where "OBJECT_NAME" = '9' and "STAT
,'888'); US" = '888' and ROWID = 'AAAFdlAAEAAAAD1AAA';
相關文章
- 日誌挖掘-對於DDL語句的挖掘
- 日誌挖掘-對於DML操作的挖掘
- MySQL的DDL和DML操作語法MySql
- MySQL 執行 Online DDL 操作報錯空間不足?MySql
- DDL觸發器設定導致DDL無法執行(二)觸發器
- DDL觸發器設定導致DDL無法執行(一)觸發器
- 【顯式授權】Procedure中無法完成DDL的建表操作的原因探查
- DDL操作的自動提交
- 在oracle中Logmnr進行日誌挖掘Oracle
- Oracle 執行 DDL 長時間無響應Oracle
- 限制DDL操作(四)
- 限制DDL操作(三)
- 限制DDL操作(二)
- 限制DDL操作(一)
- MySQL DDL操作表MySql
- logmnr 日誌挖掘
- 禁止使用者的DDL操作
- 04 MySQL 表的基本操作-DDLMySql
- DDL,DML操作對結果快取的影響快取
- 配置GoldenGate啟動DDL支援同步DDL操作Go
- 空閒表上的聯機ddl操作有風險嗎
- 控制DDL許可權及紀錄DDL操作的Trigger
- ORACLE LOGMNR 日誌挖掘Oracle
- 從Logminer日誌挖掘中找出可疑的操作
- mysql的DDL操作對業務產生影響測試MySql
- oracle追蹤誤操作DDLOracle
- DML操作 DDL觸發器觸發器
- DML, DDL操作的自動提交問題
- 11.2.0.3.0 comment 操作不再是ddl操作???
- DDL、DML、DCL、DQL相關操作
- Mysql 基礎操作 DDL DML DCLMySql
- Oracle 觸發器 限制DDL操作Oracle觸發器
- 資料庫DDL操作審計資料庫
- 資料庫操作語言DDL資料庫
- MySQL5.7 InnoDB線上DDL操作MySql
- 使用自治事務在觸發器中執行DDL語句示例觸發器
- MySQL DDL執行方式-Online DDL介紹MySql
- 禁止DDL執行的trigger