Oracle 10g Logminer clob bug
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
SQL> create table tbl_clob(id number,fld_clob clob,primary key(id));
表已建立。
SQL> select * from v$log where status='CURRENT';
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIME
------------- --------------
3 1 12 52428800 1 NO CURRENT
216826 29-12月-10
SQL> select dbms_flashback.get_system_change_number from dual;
GET_SYSTEM_CHANGE_NUMBER
------------------------
231724
SQL> insert into tbl_clob values (1,'''');
已建立 1 行。
SQL> commit;
提交完成。
SQL> select dbms_flashback.get_system_change_number from dual;
GET_SYSTEM_CHANGE_NUMBER
------------------------
231727
SQL> select * from v$log where status='CURRENT';
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIME
------------- --------------
3 1 12 52428800 1 NO CURRENT
216826 29-12月-10
SQL> select * from v$logfile where group#=3
2 ;
GROUP# STATUS TYPE
---------- ------- -------
MEMBER
--------------------------------------------------------------------------------
IS_
---
3 ONLINE
C:ORACLEPRODUCT10.2.0ORADATATESTREDO03.LOG
NO
SQL> begin
2 sys.dbms_logmnr.add_logfile('C:ORACLEPRODUCT10.2.0ORADATATESTREDO03
.LOG');
3 end;
4 /
PL/SQL 過程已成功完成。
SQL> begin
2 sys.dbms_logmnr.start_logmnr(startScn => 231724,endScn => 231727,Options
=> 2064);
3 end;
4 /
PL/SQL 過程已成功完成。
SQL> select sql_redo from v$logmnr_contents;
SQL_REDO
--------------------------------------------------------------------------------
set transaction read write;
insert into "TEST"."TBL_CLOB"("ID","FLD_CLOB") values ('1',EMPTY_CLOB());
update "TEST"."TBL_CLOB" set "FLD_CLOB" = ''' where "ID" = '1';
commit;
挖掘出來的update是無法直接執行的,Oracle 忽略了輸入單引號的情況。[@more@]
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
SQL> create table tbl_clob(id number,fld_clob clob,primary key(id));
表已建立。
SQL> select * from v$log where status='CURRENT';
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIME
------------- --------------
3 1 12 52428800 1 NO CURRENT
216826 29-12月-10
SQL> select dbms_flashback.get_system_change_number from dual;
GET_SYSTEM_CHANGE_NUMBER
------------------------
231724
SQL> insert into tbl_clob values (1,'''');
已建立 1 行。
SQL> commit;
提交完成。
SQL> select dbms_flashback.get_system_change_number from dual;
GET_SYSTEM_CHANGE_NUMBER
------------------------
231727
SQL> select * from v$log where status='CURRENT';
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIME
------------- --------------
3 1 12 52428800 1 NO CURRENT
216826 29-12月-10
SQL> select * from v$logfile where group#=3
2 ;
GROUP# STATUS TYPE
---------- ------- -------
MEMBER
--------------------------------------------------------------------------------
IS_
---
3 ONLINE
C:ORACLEPRODUCT10.2.0ORADATATESTREDO03.LOG
NO
SQL> begin
2 sys.dbms_logmnr.add_logfile('C:ORACLEPRODUCT10.2.0ORADATATESTREDO03
.LOG');
3 end;
4 /
PL/SQL 過程已成功完成。
SQL> begin
2 sys.dbms_logmnr.start_logmnr(startScn => 231724,endScn => 231727,Options
=> 2064);
3 end;
4 /
PL/SQL 過程已成功完成。
SQL> select sql_redo from v$logmnr_contents;
SQL_REDO
--------------------------------------------------------------------------------
set transaction read write;
insert into "TEST"."TBL_CLOB"("ID","FLD_CLOB") values ('1',EMPTY_CLOB());
update "TEST"."TBL_CLOB" set "FLD_CLOB" = ''' where "ID" = '1';
commit;
挖掘出來的update是無法直接執行的,Oracle 忽略了輸入單引號的情況。[@more@]
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/19423/viewspace-1043869/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle 10g logminerOracle 10g
- oracle 10g中logminer的使用Oracle 10g
- Oracle 10g Logminer 研究及測試Oracle 10g
- oracle9i replace clob 的一個bugOracle
- 使用Oracle 10g的Logminer挖掘日誌Oracle 10g
- 遇著個oracle 10g bugOracle 10g
- Oracle LogMinerOracle
- [zt] Oracle LogMinerOracle
- Oracle logminer(轉)Oracle
- oracle 10g clusterware 在redhat as 5上的bugOracle 10gRedhat
- oracle 10g clusterware 在redhat as 5上的bugOracle 10gRedhat
- Oracle Logminer 說明Oracle
- Oracle logminer學習Oracle
- 【Oracle】Oracle logminer功能介紹Oracle
- Oracle Blob 轉換為ClobOracle
- ORACLE logminer 日誌挖掘Oracle
- (轉)Oracle Logminer 說明Oracle
- oracle之logminer的使用Oracle
- Oracle高可用之LogMinerOracle
- 安裝oracle 的LogMinerOracle
- Oracle Clob的一致讀Oracle
- java jdbc存取oracle clob型別JavaJDBCOracle型別
- 關於Oracle的BLOB和CLOBOracle
- 【Oracle】-oracle 10g undo表空間使用率居高不下bugOracle 10g
- ORACLE的日誌挖掘 logminerOracle
- 記一次Oracle logminerOracle
- [zt] Oracle LogMiner 終結版Oracle
- solaris 10安裝oracle 10g到86%時一個BUGOracle 10g
- oracle clob欄位去除html標籤OracleHTML
- Oracle中Clob型別處理解析Oracle型別
- 使用oracle的logminer同步資料Oracle
- Oracle 12c logminer測試Oracle
- oracle9i logMiner的使用Oracle
- oracle bugOracle
- Oracle 中LONG RAW BLOB CLOB型別介紹Oracle型別
- Oracle Long型別轉換為Clob型別Oracle型別
- Oracle 9i/10g的Bug和修復列表及升級指南Oracle
- 10G SQLPLUS CLEAR SCREEN BUGSQL