Know more about DML

Oracle数据库回滚段与SCN详解
本文详细介绍了Oracle数据库中回滚段的工作原理及其分配机制,包括回滚段的收缩方式、系统回滚段的使用场景以及SCN(系统提交编号)的作用和结构。此外还探讨了在不同情况下如何分配回滚段中的撤销块。

The change vectors as constructed by the transaction layer are used by the cache layer to apply the physical block changes. Redo log ordering and recovery as well as read consistency are the fundamental purposes of SCNs. The change vector: Change vectors are built in the PGA process of the process modifying a block, have the DBA and SCN/SEQ of the block before the change, and only ever perform the change for one block. The system commit number: The SCN is a 6-byte structure consisting of the SCN base and SCN wrap. Is a 6-byte structure consisting of the SCN base and SCN wrap, 4 bytes for the SCN base and 2 bytes for the SCN wrap The SCN is used within the data block to reflect the committed version of the block. There is only one global SCN generator for each database. A large transaction is defined as a transaction that is participating in a parallel DML (PDML) operation or a distributed transaction. One of the first checks for rollback segment allocation is whether the transaction is participating in a PDML or distributed transaction. These are used to determine the largest rollback segment to be allocated. steps below to illustrate the order necessary to begin a transaction. 1.bind to the available rollback segment 2.allocate a slot in the transaction table 3.allocate an undo block to the rollback segment When a free slot cannot be allocated in the transaction table, exclusive access is acquired in the rollback segment header. Only when a free slot can be allocated in the transaction table do you gain exclusive access to the RBS header. The system rollback segment will be used only for data for the system tablespace and data that is being created from recursive SQL calls generated by user data. The search for the allocation of an undo block to a rollback segment will occur in: Searching for an undo block to be allocated will begin in the current extent if the extent boundary has not been reached, in the next extent provided there are no uncommitted transactions, or in a newly allocated extent if the next extent has uncommitted data. Rollback segments are shrunk either explicitly through the ’alter rollback segment … shrink to …’ command or implicitly by the SMON process. Implicit shrinkage can be disabled by: PCTINCREASE has no affect on rollback segments. All extents will be sized by the setting of the next_extent storage attribute. Setting the event 10512 will disable the implicit shrink operation performed by SMON. Setting the initialization parameter ‘rbs_disable_shk’. There is no such parameter. Setting the event 10512 will disable the implicit shrinkage operation performed by SMON. The Oracle server begins shrinking a rollback segment starting from the current extent +2 Rollback segment shrinkage will occur while optimal or minextents is not reached, there are at least two remaining extents, the extent is not busy, and the extent is not extent #0. An extent is reused if all its blocks are inactive. RBS undo blocks are reused on a per extent basis. An undo block becomes inactive when the active transaction in the undo block commits. correct order of Interested Transaction List (ITL) allocation. 1. Find an



本文转自maclean_007 51CTO博客,原文链接:http://blog.51cto.com/maclean/1276730

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值