ITPub博客

首页 > 应用开发 > IT综合 > Lock Duration (335)

Lock Duration (335)

原创 IT综合 作者:tsinglee 时间:2007-12-09 10:25:30 0 删除 编辑

All locks acquired by statements within a transaction are held for the duration of the
transaction, preventing destructive interference including dirty reads, lost updates,
and destructive DDL operations from concurrent transactions. The changes made by
the SQL statements of one transaction become visible only to other transactions that
start after the first transaction is committed.

Oracle releases all locks acquired by the statements within a transaction when you
either commit or undo the transaction. Oracle also releases locks acquired after a
savepoint when rolling back to the savepoint. However, only transactions not waiting
for the previously locked resources can acquire locks on the now available resources.
Waiting transactions will continue to wait until after the original transaction commits
or rolls back completely.

锁的持续时间
1. 事务内各语句获得的锁在事务结束前持续,以防止事务间破坏性的相互干扰,例如:脏读取,
无效地更新 ,以及其他并发事务中具有破坏性的 DDL 操作
2. 当提交或者回滚事务后 , Oracle将释放所有的由执行语句获得的锁
3. 锁释放侯 ,当前没有等待被锁资源的事务才能获得可用资源的锁。其他等待事务将继续等待,
直至最原始的事务完全提交或回滚

[@more@]

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

上一篇: Modes of Locking (334)
请登录后发表评论 登录
全部评论
  • 博文量
    740
  • 访问量
    1892723