Transactions and Consistency

Transaction table:
  • There is a limited number of entries in transaction table, so you will have to keep reusing them. Each time you reuse an entry in the table, you increment
    the wrap# for that entry.
  • “Does the wrap# get reset every time the instance restarts?” The answer is no.
  • Check the transaction table information: x$ktuxe(query against the structure will actually cause Oracle to visit each undo segment header block of each
    undo segment in the database)

ColumnDescription
indexIdentifies the row in the transaction table and is used as part of the transaction id. This is
known most commonly as the transaction table slot number. (It’s not a value that’s
physically stored in the block, by the way—it’s a value derived by position when we dump
the block.)
stateThe state of the entry: 9 is INACTIVE, and 10 is ACTIVE.
cflagsBit flag showing the state of a transaction using the slot: 0x0 no transaction, 0x10
transaction is dead, 0x80 active transaction. (0x90 – dead and being rolled back).
wrap#A counter for the number of times the slot has been used. Part of the transaction id.
uelA pointer to the next transaction table slot to use after this one goes active. In a new
segment this will look very tidy, but as transactions come and go, the pointers will
eventually turn into a fairly random linked list wandering through the slots.
scnThe commit SCN for a committed transaction. (Since a rollback call ends with a commit,
this would also be used for the commit SCN at the end of a rollback). For most versions of
Oracle, this column is also used as the start SCN when the transaction is active, but,
strangely, my copy of 10.2.0.3 dumps this as zero for active transactions.
dbaData Block Address of the last undo block that the transaction used to write an undo
record. This allows Oracle (particularly on crash recovery) to find the last undo record
generated by a transaction so that it knows where to start the process of rolling back.
nubNumber of undo blocks used by this transaction so far. (During a transaction rollback you
can watch this number decrease.)
cmtCommit time to the nearest second, measured as the number of seconds since midnight
(UTC) of 1 January 1970. It is zero when the transaction is active. Since this seems to be a
32-bit number it has crossed my mind to wonder whether some systems may run into
trouble in January 2038 if it’s treated as a signed integer or in February 2106 if it’s treated as
unsigned.

Transaction ID:
  • 0x0009.002.00002013: the undo segment number, the index number of the entry in the transaction table, and the latest wrap# of that entry
  • Check which undo segment this is and the location of the header block: query view dba_rollback_segs by segment_id.
  • Query transaction id: v$transaction and v$lock
Reviewing the Undo Block
  • A single undo block may contain undo records from multiple transactions.
  • Active transactions will not write to the same undo block at the same time, but several transactions may have used the same undo block one after the other.(free block pool)
Data Block Visits and Undo
  • ITL(The interested transaction list): exists to identify transactions that recently changed a data block

ColumnDescription
ItlThe array index for the list. The number isn’t physically stored in the block; it’s generated
by the code that does the dump. This value is used in the lock byte (lb:) for a row to show
which transaction has locked the row.
XidThe transaction id of a recent transaction that has modified this block. The format is undo
segment . undo slot . undo sequence number.
UbaThe undo record address—including the sequence (or incarnation) number—of the block
of the most recent undo record generated by this transaction for this block. The format is
Absolute block address . block sequence number . record within block. (The “b” in
the label suggests byte or block, but neither of those interpretations is quite accurate.)
FlagBit flag identifying the apparent state of this transaction:
----: active (or “never existed” if every field in the Xid is zero).
--U-: Upper bound commit (also set during “fast commit”).
C---: Committed and cleaned out (all associated lock bytes have been reset to zero).
-B--: May be relevant to the recursive transactions for index block splits. I have seen
comments that this flag means the UBA will point to a record holding the previous
content of the ITL entry, but I have not managed to confirm this.
---T: I have seen comments that this means the transaction was active during block
cleanout, but I have not managed to confirm this.
LckNumber of rows locked by this transaction in this block.
Scn/FscDepending on the Flag, the commit SCN or the number of bytes of free space that would
become available if this transaction committed (Free Space Credit).

Parameters:

  • initrans --- create an object with a larger ITL in each block 

             maxtrans --- limit the size of the ITL

    • For an index: the default value is 2(one for branch and another for leaf), even though the data dictionary will still report 1
    • And if you load some blocks using direct path loads, you will find that they initially have three ITL entries.
    • on an index leaf block split, the old ITL is copied forward into the new leaf block
  • Concurrent Action
  • LOBs
    • Oracle has some special methods for handling undo and redo on LOBs
内容概要:本文详细介绍了如何利用Simulink进行自动代码生成,在STM32平台上实现带57次谐波抑制功能的霍尔场定向控制(FOC)。首先,文章讲解了所需的软件环境准备,包括MATLAB/Simulink及其硬件支持包的安装。接着,阐述了构建永磁同步电机(PMSM)霍尔FOC控制模型的具体步骤,涵盖电机模型、坐标变换模块(如Clark和Park变换)、PI调节器、SVPWM模块以及用于抑制特定谐波的陷波器的设计。随后,描述了硬件目标配置、代码生成过程中的注意事项,以及生成后的C代码结构。此外,还讨论了霍尔传感器的位置估算、谐波补偿器的实现细节、ADC配置技巧、PWM死区时间和换相逻辑的优化。最后,分享了一些实用的工程集成经验,并推荐了几篇有助于深入了解相关技术和优化控制效果的研究论文。 适合人群:从事电机控制系统开发的技术人员,尤其是那些希望掌握基于Simulink的自动代码生成技术,以提高开发效率和控制精度的专业人士。 使用场景及目标:适用于需要精确控制永磁同步电机的应用场合,特别是在面对高次谐波干扰导致的电流波形失真问题时。通过采用文中提供的解决方案,可以显著改善系统的稳定性和性能,降低噪声水平,提升用户体验。 其他说明:文中不仅提供了详细的理论解释和技术指导,还包括了许多实践经验教训,如霍尔传感器处理、谐波抑制策略的选择、代码生成配置等方面的实际案例。这对于初学者来说是非常宝贵的参考资料。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值