Oracle Internal Research深入研究Oracle内部原理

以下是我个人原创或总结的一些深入研究Oracle Internal内部原理的文章post列表:

Oracle Internal Event:10200 Consistent Read诊断事件

了解Oracle RAC Brain Split Resolution

了解Oracle内核代码层的作用

了解你所不知道的SMON功能(九):维护MON_MODS$字典基表

了解你所不知道的SMON功能(八):Transaction Recover

了解你所不知道的SMON功能(七):清理IND$字典基表

了解你所不知道的SMON功能(六):Instance Recovery

了解你所不知道的SMON功能(五):Recover Dead transaction

了解你所不知道的SMON功能(四):维护col_usage$字典基表

了解你所不知道的SMON功能(三):清理obj$基表

了解你所不知道的SMON功能(二):合并空闲区间

了解你所不知道的SMON功能(一):清理临时段

Know more about commit

Find INTCOL#=1001 in col_usage$?

Buffer Lock Mode and Compatibilities

关于V$OPEN_CURSOR

Advanced Diagnostic using oradebug dumpvar

还原真实的cache recovery

Oracle内部视图:x$targetrba

Oracle内部视图:x$ktfbfe

Oracle内部视图:x$ktfbue

Only ARCH Bgprocess may create archivelog?

Oracle Latch:一段描绘Latch运作的伪代码

Who pulls the background process dbwr’s trigger?

基于行跟踪的ROWDEPENDENCIES ORA_ROWSCN信息

Oracle闩:Cache Buffers chains

Latches and Tuning:Latches

Latches and Tuning:Redo Log Buffer and Latches

Latches and Tuning:Buffer Cache

Latches and Tuning:The Library Cache

Oracle Database Links Master Class

Oracle等待事件:Data file init write

What’s the Point of Oracle Checkpoints?

How does RECORDLENGTH affect your exp speed?

Oracle网络TNS协议介绍(revised)

logfile switch causes incremental checkpoint?

Know more about redo log buffer and latches

How does cpu_count parameter affect instance?

How to trigger ORA-00600,ORA-7445 by manual

Basics of C code within the Oracle kernel

Know more about Oracle Latches

Know more about Buffer Cache and Latch

Know More About Libarary Cache and Latches

Oracle内部视图:X$BH

Know more about DML

Known Oracle Internal Stack Call Meaning

深入了解ASMM

_shared_pool_reserved_pct or shared_pool_reserved_size with ASMM

PL/SQL Virtual Machine Memory Usage

Slide:深入了解Oracle自动内存管理ASMM by Maclean Liu

Know GCS AND GES structure size in shared pool

How does SGA/PGA allocate on AMM?

理解Oracle在AIX平台上的内存使用

Probe how does your PGA consume

ora-4031 and “obj stat memory” component in Shared Pool

直接路径读取对于延迟块清除的影响

How to make BBED(Oracle Block Brower and EDitor Tool) on Unix/Linux/Windows

隐藏参数_high_priority_processes与oradism

Oracle等待事件Enqueue CI:Cross Instance Call Invocation

Oracle常用的几个父栓

ddl操作是否会产生undo?

kgl simulator,共享池simulator以及缓冲simulator相关解释

Know more about DML

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  Unused ITL
2. FInd ITL of oldest commited TX
3. DO a partial block cleanout that stops when an ITL becomes available
4. Extend ITL area

The variable portion of the transaction layer is dictated by the MAXTRANS parameter.
The INITRANS parameter dictates the number of ITL’s and hence the variable portion of the Transaction Layer.

An ITL must be acquired by any transaction wishing to modify a block. If an ITL is unavailable and there is no space left in the block, a transaction will wait.

A transaction that currently has an ITL within a block cannot update any row in the block if the required row is locked by a previous transaction. That transaction will wait on the TX enqueue.When attempting to update a row already held by a previous transaction, a transaction will wait on the TX enqueue in exclusive mode.

The free space credit field of the transaction layer maintains the space as freed for a given transaction, and that is returned on commit of the transaction.

When a transaction is unable to allocate an ITL within a data block for which it needs to modify a block, the transaction will:
That transaction will wait on the TX enqueue in share mode until an ITL becomes available within the block where the modification is required.

The Oracle server maintains the row header flag and lock byte (total 2 bytes) for the deleted row. It is necessary to keep these first two bytes to maintain the row lock. This is referred to as stub space.

The correct statistic Rollback changes – undo records applied is incremented for each link in the undo record chain.

The Data Block Address (DBA) in the Transaction Table slot indicates:
The beginning of the undo chain for the transaction  Correct! The DBA in the Transaction Table slot is the starting point for rolling back a transaction

the correct sequence of events at the COMMIT of a transaction.

1. FIND an scn value
2. update the transaction table slot with the scn
3. create a commit record in the redo log buffer
4. flush the redo log buffer to disk
5. release locks held on the rows and tables

The application of the undo to the data block is performed by the
The data layer ,and the transaction layer do not have the right to perform physical block-level changes.

沪ICP备14014813号-2

沪公网安备 31010802001379号