现在的位置: 首页 > 综合 > 正文

Transaction Table,TransactionTable Slot,undo

2013年10月11日 ⁄ 综合 ⁄ 共 1784字 ⁄ 字号 评论关闭

Transaction Table:
Each undosegment header block(q.v.) has an area in it called thetransaction table. When atransaction starts, it picks an undo
segment to use then picks the oldest freeentry (called a transaction table“slot”) from that segment header’s transaction table.
This slot is the identifying marker for atransaction, and information about it is published in two ways – first as thetransaction ID inv$transaction,
and secondly in
v$lockwhere aTXlock is reported in mode 6 (exclusive) by the session
runningthe transaction.
Both locations identify the transaction bythe triple: (undo segment number, slot number, sequence number).
(The number of slots in a
transactiontableis limited so each one hasa sequence number stamped on it, and each time a slot is re-used the sequence number goes up by
one). As a transaction starts, the “startSCN” is one of the items written to thetransaction table slot; when the transaction commits
this is changed to the“commit
SCN“.

 

TransactionTable Slot:
a single row in a
TransactionTable(q.v.)representing a single transaction. Since there are only a limited number of rows (slots) in a transactiontable, part of the
row data includes a“usage counter”, known as the“sequence”.
Atransactionidis thenthe combination of the undo segment number that the transaction table is in,the row (slot) number in the transaction
table, and the sequence number of therow (slot).
The parts of the
transaction id can beseen in the view
v$transactionin the columns:xidusn,xidslot,xidsqn.
Inthe latest versions of Oracle, the entire transaction id is also reported as araw(8)column calledxid.

 

Undo: (formerly known asrollback): information describing how to reverse out changes made to data blocks (including index blocks,
bitmap file header blocksetc). A singleundorecord isa description of how to reverse out a single “dbblock
change”
.  Undo is stored inundosegments, which are created inundotablespaces,
and eachundosegment headerholds a“catalogue”(called
the
transactiontable) which shows where recent transactions wrotetheir first undo record.

抱歉!评论已关闭.