Oracle Lock Management Services (365)

tsinglee發表於2007-12-13

With Oracle Lock Management services, an application developer can include
statements in PL/SQL blocks that:
■ Request a lock of a specific type
■ Give the lock a unique name recognizable in another procedure in the same or in
another instance
■ Change the lock type
■ Release the lock
Because a reserved user lock is the same as an Oracle lock, it has all the Oracle lock
functionality including deadlock detection. User locks never conflict with Oracle locks,
because they are identified with the prefix UL.

The Oracle Lock Management services are available through procedures in the DBMS_LOCK
package.

Oracle鎖管理服務
1. 利用 Oracle 鎖管理服務可以在 PL/SQL 塊中使用以下語句 :
a. 獲取特定型別的鎖
b. 給鎖取一個可識別的唯一名字
c. 改變鎖的型別
d. 釋放鎖
2. 使用者鎖具備Oracle鎖的功能(包括死鎖檢測) . 使用者鎖不會與Oracle鎖衝突 ,
因為使用者鎖的名稱使用字首 UL.
3. 可透過DBMS_LOCK包使用 Oracle 的鎖管理服務

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10599713/viewspace-992630/,如需轉載,請註明出處,否則將追究法律責任。

相關文章