ITPub博客

首页 > 应用开发 > IT综合 > Share DDL Locks (354)

Share DDL Locks (354)

原创 IT综合 作者:tsinglee 时间:2007-12-12 11:05:32 0 删除 编辑
Some DDL operations require share DDL locks for a resource to prevent destructive interference with conflicting DDL operations, but allow data concurrency for similar DDL operations. For example, when a CREATE PROCEDURE statement is run, the containing transaction acquires share DDL locks for all referenced tables. Other transactions can concurrently create procedures that reference the same tables and therefore acquire concurrent share DDL locks on the same tables, but no transaction can acquire an exclusive DDL lock on any referenced table. No transaction can alter or drop a referenced table. As a result, a transaction that holds a share DDL lock is guaranteed that the definition of the referenced schema object will remain constant for the duration of the transaction. A share DDL lock is acquired on a schema object for DDL statements that include the following statements: AUDIT, NOAUDIT, COMMENT, CREATE [OR REPLACE] VIEW/ PROCEDURE/PACKAGE/PACKAGE BODY/FUNCTION/ TRIGGER, CREATE SYNONYM, and CREATE TABLE (when the CLUSTER parameter is not included). 共享DDL锁 1. 保护方案对象和其他DDL操作发生冲突 , 保证事务在执行期间,所有引用对象的定义不会被 修改 2. 当创建一个过程时 , 事务将获得其中引用的每个方案对象的共享DDL锁.其他事务也可并发 的创建过程引用相同的方案对象 ,但没有事务能获得排他DDL锁 3. 执行下来语句时需要获得共享DDL锁 . audit , comment...[@more@]

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

请登录后发表评论 登录
全部评论
  • 博文量
    740
  • 访问量
    1892176