20_深入解析Oracle undo原理(4)_ktuxc詳解
1 問題描述
KTUXC(UNDO TRANSACTION CONTROL) 表示回滾段事務控制,是undo 段頭塊中的一部分,使用CHD (Commit Head)和CTL (Commit Tail)快速定位該回滾段中可用的slot number。結構如下圖所示,
2 KTUXC 結構解析
SYS@source>select * from orastar.undo_test;
C1 C2
------------------------------ ------------------------------
4 222
2 12
3 123
SYS@source>update orastar.undo_test set c2='666' where c1=4;
1 row updated.
select xidusn,
xidslot,
xidsqn,
ubafil,
ubablk,
ubasqn,
ubarec,
used_ublk,
used_urec
from v$transaction;
oradebug setmypid
alter system dump undo header '_SYSSMU14$';
oradebug close_trace
oradebug tracefile_name
【欄位解釋】
SEQ: Sequence number of the last block of the undo segment.
CHD (Commit Head): Head of the chain of the list of committed transactions sorted by increasing SCN (this points to an entry in the transaction table)
CTL (Commit Tail): Tail of the chain of the list of committed transactions, sorted by SCN (this points to an
entry in the transaction table).
INC: High water mark for incarnation number (increases by steps of 1024).
NFB: Number of nonempty slots in the free block pool.
MGC: Magic number for test of coherence (for AUM segments this value is 0x8201).
XTS: Tx table entry location from bottom of KCBH.
FLG: Value 1. Tx table has been converted from an earlier version.
OPT: Value for the OPTIMAL parameter.
UBA (Control UBA): The UBA of the undo record allowing rollback of the Tx table.
SCN (Control SCN): The committed SCN of the transaction that “rolled out” of the Tx table
3 驗證chd 欄位
驗證chd 欄位是否為下一個待使用的usn slot,
create undo tablespace undo6 datafile '/oradata/htdb/undo6.dbf' size 256K autoextend off;
alter system set undo_tablespace=undo6;
update orastar.undo_test set c2='666' where c1=4;
oradebug setmypid
alter system dump undo header '_SYSSMU101$';
oradebug close_trace
oradebug tracefile_name
4 Tx table 的排序
Tx table 中slot 的排序,從 CHD (Commit Head) 開始,通過KTUXEUEL指向下一個slot,直到ktuxeslt等於CTL (Commit Tail)時KTUXEUEL為-1。所有usn中INACTIVE slot以KTUXESCNB和KTUXESLT升序排列。
5 總結
ktuxc 使用單向連結串列結構控制ktuxe 中待使用的 INACTIVE slot ,從CHD (Commit Head)開始CTL (Commit Tail)結束,以KTUXESCNB和KTUXESLT升序排列。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31442014/viewspace-2680395/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 19_深入解析Oracle undo原理(3)_ktuxe詳解OracleUX
- 17_深入解析Oracle undo原理(1)_transactionOracle
- Oracle undo管理詳解Oracle
- 18_深入解析Oracle undo原理(2)_undo表空間使用率100%問題處理Oracle
- Oracle UNDO引數詳解Oracle
- Oracle深入Undo探究Oracle
- 深入解析 oracle drop table內部原理Oracle
- MJExtension原理深入解析
- ThreadLocal原理深入解析thread
- 深入詳細瞭解synchronized底層原理synchronized
- 【筆記】oracle 並行原理深入解析及案例精粹筆記Oracle並行
- 深入詳解Redis 主從複製的原理!Redis
- 深入 Redis 主從複製的原理詳解Redis
- Java集合詳解(二):ArrayList原理解析Java
- Java集合詳解(五):Hashtable原理解析Java
- Java集合詳解(三):HashMap原理解析JavaHashMap
- Hyperledger Fabric原理詳解與實戰4
- 深入瞭解View實現原理以及自定義View詳解View
- 從ReentrantLock詳解AQS原理原始碼解析ReentrantLockAQS原始碼
- Java集合詳解(三):LinkedList原理解析Java
- 深入解析vue響應式原理Vue
- oracle實用sql(4)--undo advisorOracleSQL
- oracle實驗記錄 (dump undo4)Oracle
- 深入原始碼解析 tapable 實現原理原始碼
- InnoDB undo log原理
- undo的工作原理
- 深入瞭解Synchronized原理synchronized
- 讀書筆記:深入解析oracle-第4章 資料字典筆記Oracle
- Flutter完整開發實戰詳解(九、 深入繪製原理)Flutter
- Flutter完整開發實戰詳解(七、 深入佈局原理)Flutter
- Flutter完整開發實戰詳解(六、 深入Widget原理)Flutter
- 深入詳解Mybatis的架構原理與6大核心流程MyBatis架構
- 深入詳解Java反射機制與底層實現原理?Java反射
- 《Oracle Golden Gate 概念和原理》-新手入門->深入解析-圖文-可下載OracleGo
- 《深入解析Oracle》第六章,Buffer Cache與Shared Pool原理Oracle
- oracle體系結構梳理---redo和undo解析1Oracle
- Oracle AWR與ASH效能報告深入解析-核心引數詳解-手操-圖文-可下載Oracle
- 深入解析Vue中的computed工作原理Vue