Types of Locks (340)

tsinglee發表於2007-12-10

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部落格 ” ,連結:http://blog.itpub.net/10599713/viewspace-990928/,如需轉載,請註明出處,否則將追究法律責任。

相關文章