ITPub博客

首页 > 数字化转型 > ERP > Commit Transactions (143)

Commit Transactions (143)

原创 ERP 作者:tsinglee 时间:2007-11-05 11:43:42 0 删除 编辑

Committing a transaction means making permanent the changes performed by the
SQL statements within the transaction.
Before 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.
When 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.

提交事务
当事务修改的数据被提交之前 , 发生了以下事情
1. Oracle生成了回滚信息
2. Oracle在SGA中的重做日志缓冲区中生成了重做日志条目
3. 事务做的改变made to the database buffers of the SGA
当事务被提交时 , 发生了以下事情
1. 内部事务表关联的回滚段记录事务已经提交 , scn被记录在表中
2. lgwr将重做日志条目从redo logbuffers写入 redo log file ,事务的scn也表记录在重做日志文件中
3. Oracle释放表行和表的锁
4. Oracle标记事务结束

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10599713/viewspace-980851/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
  • 博文量
    740
  • 访问量
    1897851