ITPub博客

首页 > 应用开发 > IT综合 > Modes of Locking (334)

Modes of Locking (334)

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

Oracle uses two modes of locking in a multiuser database:
■ Exclusive lock mode prevents the associates resource from being shared. This lock
mode is obtained to modify data. The first transaction to lock a resource
exclusively is the only transaction that can alter the resource until the exclusive
lock is released.
■ Share lock mode allows the associated resource to be shared, depending on the
operations involved. Multiple users reading data can share the data, holding share
locks to prevent concurrent access by a writer (who needs an exclusive lock).
Several transactions can acquire share locks on the same resource.

锁的类型
1. 排他锁 : 阻止被锁定的资源共享. 对数据进行修改时,需要或得这种锁.第一个排他地对资源加
锁的事物是唯一可以对此资源进行修改的事物,直至排他锁被释放
2. 共享锁 : 根据操作类型 , 允许被锁定的资源共享 . 多个事务可对相同的资源加共享锁

[@more@]

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

下一篇: Lock Duration (335)
请登录后发表评论 登录
全部评论
  • 博文量
    740
  • 访问量
    1900460