dml_locks =0会禁用DDL

本文标题:dml_locks =0会禁用DDL【本站如从外站转载,会注明出处】
本文链接:http://www.validba.net/2009/03/dml_locks-0%e4%bc%9a%e7%a6%81%e7%94%a8ddl/

dml_locks定义了单张表上单个事务所能持有的最大DML lock数.不支持动态修改,默认值为4×transactions.如果将参数设置为0,那么它会禁用Enqueues.而且还会禁用一系列针对TABLE的ddl操作.(create table除外) . 其他的DDL不会禁用. 比如create synonym等.

SQL> alter system set dml_locks=0 scope=spfile;

System altered.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> startup
ORACLE instance started.

Total System Global Area  209715200 bytes
Fixed Size                  1266632 bytes
Variable Size             142609464 bytes
Database Buffers           62914560 bytes
Redo Buffers                2924544 bytes
Database mounted.
Database opened.

SQL> alter index test_sex rebuild;
alter index test_sex rebuild
*
ERROR at line 1:
ORA-00062: DML full-table lock cannot be acquired; DML_LOCKS is 0

SQL> create index test_id on test_histogram(id);
create index test_id on test_histogram(id)
                        *
ERROR at line 1:
ORA-00062: DML full-table lock cannot be acquired; DML_LOCKS is 0

SQL>
SQL>
SQL> drop index test_sex;
drop index test_sex
           *
ERROR at line 1:
ORA-00062: DML full-table lock cannot be acquired; DML_LOCKS is 0
SQL> 

CopyRight Validba'S Home 版权所有.本站为个人学习之用,评论时请遵守本国法律

Relative Posts

Tags:

Leave a Reply