Concepts精选片段

040Before a transaction that modifies data is committed, the following has occurred:
  • Oracle has generated undo information. The undo information contains the old data values changed by the SQL statements of the transaction.
  • Oracle has generated redo log entries in the redo log buffer of the SGA. The redo log record contains the change to the data block and the change to the rollback block. These changes may go to disk before a transaction is committed.
  • The changes have been made to the database buffers of the SGA. These changes may go to disk before a transaction is committed.
在一个修改了数据的事务(transaction)被提交之前,Oracle进行了以下操作:
  • Oracle生成了撤销信息(undo information)。撤销信息包含了事务中各个 SQL 语句所修改的数据的原始值。
  • Oracle在 SGA 的重做日志缓冲区(redo log buffer)中生成了重做日志条目(redo log entry)。重做日志记录(redo log record)中包含了对数据块(data block)和回滚块(rollback block)所进行的修改操作。这些记录可能在事务提交之前被写入磁盘。
  • 对数据的修改已经被写入 SGA 中的数据库缓冲区(database buffer)。这些修改可能在事务提交之前被写入磁盘。
041
Note:

The data changes for a committed transaction, stored in the database buffers of the SGA, are not necessarily written immediately to the datafiles by the database writer (DBWn) background process. This writing takes place when it is most efficient for the database to do so. It can happen before the transaction commits or, alternatively, it can happen some time after the transaction commits.
提示:

已提交事务(committed transaction)中对数据的修改被存储在 SGA 的数据库缓冲区(database buffer)中,她们不一定立即被后台进程 DBWn 写入数据文件(datafile)内。Oracle将选择适当的时机进行写操作以保证系统的效率。因此写操作既可能发生在事务提交之前,也可能在提交之后。

 

 

 

 

042When a transaction is committed, the following occurs:
  1. The internal transaction table for the associated undo tablespace records that the transaction has committed, and the corresponding unique system change number (SCN) of the transaction is assigned and recorded in the table.
  2. The log writer process (LGWR) writes redo log entries in the SGA's redo log buffers to the redo log file. It also writes the transaction's SCN to the redo log file. This atomic event constitutes the commit of the transaction.
  3. Oracle releases locks held on rows and tables.
  4. Oracle marks the transaction complete.
当事务(transaction)被提交之后,Oracle进行以下操作:
  1. 撤销表空间(undo tablespace)内部的事务表(transaction table)将记录此次提交(commit),Oracle为此事务分配一个唯一的系统变化编号(system change number,SCN),并将其记录在事务表中。
  2. 重做日志写进程(The log writer process,LGWR)将 SGA 内重做日志缓冲区(redo log buffer)中的重做日志条目(redo log entry)写入重做日志文件(redo log file)。同时还将此事务的 SCN 也写入重做日志文件。由以上两个操作构成的原子事件(atomic event)标志着一个事务成功地提交。
  3. Oracle释放加于表或数据行上的锁(lock)。
  4. Oracle将事务标记为完成。

 When a user issues a COMMIT statement, LGWR puts a commit record in the redo log buffer and writes it to disk immediately, along with the transaction's redo entries

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值