DML_LOCKS参数

DML_LOCKS


Property Description
Parameter type Integer
Default value Derived: 4 * TRANSACTIONS
Modifiable No
Range of values 20 to unlimited; a setting of 0 disables enqueues
Basic No
Oracle RAC You must set this parameter for every instance, and all instances must have positive values or all must be 0.
A DML lock is a lock obtained on a table that is undergoing a DML operation (insert, update, delete). DML_LOCKS specifies the maximum number of DML locks—one for each table modified in a transaction. The value should equal the grand total of locks on tables currently referenced by all users. For example, if three users are modifying data in one table, then three entries would be required. If three users are modifying data in two tables, then six entries would be required.


The default value assumes an average of four tables referenced for each transaction. For some systems, this value may not be enough.


Enqueues are shared memory structures that serialize access to database resources. If you set the value of DML_LOCKS to 0, enqueues are disabled and performance is slightly increased. However, you should be aware of the following restrictions when you set you DML_LOCKS to 0:


You cannot use DROP TABLE, CREATE INDEX statements


You cannot use explicit lock statements such as LOCK TABLE IN EXCLUSIVE MODE


Enterprise Manager cannot run on any instances for which DML_LOCKS is set to 0


Oracle holds more locks during parallel DML than during serial execution. Therefore, if your database supports a lot of parallel DML, you may need to increase the value of this parameter.


实验:


SQL> alter table test disable table lock;


Table altered.


SQL> truncate table test;
truncate table test
               *
ERROR at line 1:
ORA-00069: cannot acquire lock -- table locks disabled for TEST




SQL> insert into test values(3);


1 row created.


SQL> commit;


Commit complete.


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

转载于:http://blog.itpub.net/31448585/viewspace-2137937/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值