ITPub博客

首页 > 应用开发 > IT综合 > Types of Locks (340)

Types of Locks (340)

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

Oracle automatically uses different types of locks to control concurrent access to data
and to prevent destructive interaction between users. Oracle automatically locks a
resource on behalf of a transaction to prevent other transactions from doing something
also requiring exclusive access to the same resource. The lock is released automatically
when some event occurs so that the transaction no longer requires the resource.

Throughout its operation, Oracle automatically acquires different types of locks at
different levels of restrictiveness depending on the resource being locked and the
operation being performed.

Oracle locks fall into one of three general categories.
DML locks (data locks) : DML locks protect data. For example, table locks lock entire
tables, row locks lock selected rows.
DDL locks (dictionary locks) : DDL locks protect the structure of schema objects—for
example, the definitions of tables and views.
Internal locks and latches : Internal locks and latches protect internal database
structures such as datafiles. Internal locks and latches
are entirely automatic.

锁的类型
1. Oracle 能够根据加锁的资源及其执行的操作自动获取锁及对资源的限制级别
2. 锁通常分为3类 :
a. DML锁(数据锁) : 保护数据
b. DDL锁(字典锁) : 保护方案对象
c. 内部锁和闩锁 : 保护数据库的内部结构

[@more@]

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

上一篇: Avoid Deadlocks (339)
下一篇: DML Locks (341)
请登录后发表评论 登录
全部评论
  • 博文量
    740
  • 访问量
    2002852