FLASHBACK_TRANSACTION_QUERY 11G R2. UNDO_SQL為NULL的問題
[20111212]FLASHBACK_TRANSACTION_QUERY 11G R2.txt
1.建立測試表:
create table t1 as select rownum id,'test' from dual connect by level<=10 ;
delete from t1 where mod(id,2)=0;
commit;
2.查詢:
SELECT versions_starttime, versions_endtime, versions_xid, versions_operation, versions_startscn, versions_endscn, t1.*
FROM t1
VERSIONS BETWEEN SCN MINVALUE AND MAXVALUE
WHERE versions_operation IS NOT NULL
ORDER BY ID
VERSIONS_STARTTIME,VERSIONS_ENDTIME,VERSIONS_XID,VERSIONS_OPERATION,VERSIONS_STARTSCN,VERSIONS_ENDSCN,ID,NAME
2011-12-12 16:28:56.,,080005004C0D0000,D,3583079,,2,test
2011-12-12 16:28:56.,,080005004C0D0000,D,3583079,,4,test
2011-12-12 16:28:56.,,080005004C0D0000,D,3583079,,6,test
2011-12-12 16:28:56.,,080005004C0D0000,D,3583079,,8,test
2011-12-12 16:28:56.,,080005004C0D0000,D,3583079,,10,test
3.XID='080005004C0D0000'
SELECT * FROM flashback_transaction_query WHERE xid = HEXTORAW ('080005004C0D0000');
XID,START_SCN,START_TIMESTAMP,COMMIT_SCN,COMMIT_TIMESTAMP,LOGON_USER,UNDO_CHANGE#,OPERATION,TABLE_NAME,TABLE_OWNER,ROW_ID,UNDO_SQL
080005004C0D0000,3583074,2011-12-12 16:28:50,3583079,2011-12-12 16:28:56,SCOTT,1,UNKNOWN,T1,,,
080005004C0D0000,3583074,2011-12-12 16:28:50,3583079,2011-12-12 16:28:56,SCOTT,2,UNKNOWN,T1,,,
080005004C0D0000,3583074,2011-12-12 16:28:50,3583079,2011-12-12 16:28:56,SCOTT,3,UNKNOWN,T1,,,
080005004C0D0000,3583074,2011-12-12 16:28:50,3583079,2011-12-12 16:28:56,SCOTT,4,UNKNOWN,T1,,,
080005004C0D0000,3583074,2011-12-12 16:28:50,3583079,2011-12-12 16:28:56,SCOTT,5,UNKNOWN,T1,,,
080005004C0D0000,3583074,2011-12-12 16:28:50,3583079,2011-12-12 16:28:56,SCOTT,6,BEGIN,,,,
undo_sql是NULL,沒有資訊。OPERATION='UNKNOWN'.
4.google發現如下連結:
我目前使用的測試版本:
select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
必須執行與開啟alter database add supplemental log data;
這樣FLASHBACK_TRANSACTION_QUERY才能顯示資訊!
1.建立測試表:
create table t1 as select rownum id,'test' from dual connect by level<=10 ;
delete from t1 where mod(id,2)=0;
commit;
2.查詢:
SELECT versions_starttime, versions_endtime, versions_xid, versions_operation, versions_startscn, versions_endscn, t1.*
FROM t1
VERSIONS BETWEEN SCN MINVALUE AND MAXVALUE
WHERE versions_operation IS NOT NULL
ORDER BY ID
VERSIONS_STARTTIME,VERSIONS_ENDTIME,VERSIONS_XID,VERSIONS_OPERATION,VERSIONS_STARTSCN,VERSIONS_ENDSCN,ID,NAME
2011-12-12 16:28:56.,,080005004C0D0000,D,3583079,,2,test
2011-12-12 16:28:56.,,080005004C0D0000,D,3583079,,4,test
2011-12-12 16:28:56.,,080005004C0D0000,D,3583079,,6,test
2011-12-12 16:28:56.,,080005004C0D0000,D,3583079,,8,test
2011-12-12 16:28:56.,,080005004C0D0000,D,3583079,,10,test
3.XID='080005004C0D0000'
SELECT * FROM flashback_transaction_query WHERE xid = HEXTORAW ('080005004C0D0000');
XID,START_SCN,START_TIMESTAMP,COMMIT_SCN,COMMIT_TIMESTAMP,LOGON_USER,UNDO_CHANGE#,OPERATION,TABLE_NAME,TABLE_OWNER,ROW_ID,UNDO_SQL
080005004C0D0000,3583074,2011-12-12 16:28:50,3583079,2011-12-12 16:28:56,SCOTT,1,UNKNOWN,T1,,,
080005004C0D0000,3583074,2011-12-12 16:28:50,3583079,2011-12-12 16:28:56,SCOTT,2,UNKNOWN,T1,,,
080005004C0D0000,3583074,2011-12-12 16:28:50,3583079,2011-12-12 16:28:56,SCOTT,3,UNKNOWN,T1,,,
080005004C0D0000,3583074,2011-12-12 16:28:50,3583079,2011-12-12 16:28:56,SCOTT,4,UNKNOWN,T1,,,
080005004C0D0000,3583074,2011-12-12 16:28:50,3583079,2011-12-12 16:28:56,SCOTT,5,UNKNOWN,T1,,,
080005004C0D0000,3583074,2011-12-12 16:28:50,3583079,2011-12-12 16:28:56,SCOTT,6,BEGIN,,,,
undo_sql是NULL,沒有資訊。OPERATION='UNKNOWN'.
4.google發現如下連結:
我目前使用的測試版本:
select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
必須執行與開啟alter database add supplemental log data;
這樣FLASHBACK_TRANSACTION_QUERY才能顯示資訊!
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-713175/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 11gR2中Flashback_transaction_query的undo_sql列為空的解決辦法SQL
- MYSQL timestamp NOT NULL插入NULL的報錯問題MySqlNull
- PHP JSON_decode 返回為 null 問題PHPJSONNull
- sql中的安全問題nullSQLNull
- 【問題處理】“NOT IN”與“NULL”的邂逅Null
- class.getResource null問題Null
- vue 新增axios解決post傳引數為null問題VueiOSNull
- MySQL中NULL欄位的比較問題MySqlNull
- 第19章405頁: NOT NULL問題Null
- JSP中String a = request.getParameter(“ “),判斷a是否為null或空的問題JSNull
- Mybatis+0+null,小問題引發的血案MyBatisNull
- 【PHP程式碼審計】Null字元問題PHPNull字元
- 【char* 字元指標的用法】及【輸出NULL的問題】字元指標Null
- 簡單探討sum()函式返回null的問題函式Null
- oracle 11g ASM問題OracleASM
- 面試題((A)null).fun()——java中null值的強轉面試題NullJava
- 為毛 "typeof null" 的結果為 "object" ?NullObject
- Oracle 11g 中 cursor_sharing 設定為SIMILAR 導致的問題OracleMILA
- [20121028]not in與NULL問題.txtNull
- oracle檢視flashback_transaction_query中列operation為unknownOracle
- not null constraint和check constriant的問題及分析NullAI
- 從Access轉到MySql以後遇到的關於null問題MySqlNull
- 為什麼typeof null 的結果為 objectNullObject
- 為什麼索引無法使用is null和is not null索引Null
- mysql 查詢欄位為null或者非nullMySqlNull
- 徹底解決pidgin群顯示null問題及無法輸入中文的問題Null
- tablespace_name 為nullNull
- [20121028]IOT的第2索引-NULL的問題.txt索引Null
- 關於vue中image控制元件,onload事件裡,event.target 為null的奇怪問題探討Vue控制元件事件Null
- 關於 /dev/null 差點直播吃鞋的一個小問題devNull
- Oracle-空值null和數字相加的問題-nvl函式OracleNull函式
- 線上重定義拷貝表結構的NOT NULL約束問題Null
- 表為多列為null的表之索引示例Null索引
- flashback_transaction_query的資料來源!
- 11g升級到Oracle 12c碰到的問題(11g中不存在問題) - ORA-01792Oracle
- 解決問題:Variable 'time_zone' can't be set to the value of 'NULL'Null
- [20160704]NULL與主外來鍵問題.txtNull
- oracle分割槽表線上重定義欄位not null問題OracleNull