DDL_LOCK_TIMEOUT的作用
来源:互联网 发布:5g云网络wlxiu 编辑:程序博客网 时间:2024/06/07 02:46
11g的DDL_LOCK_TIMEOUT参数的作用,从字面上看,就是DDL获取锁的超时时间。
先看下官方文档的介绍:
DDL_LOCK_TIMEOUT
DDL_LOCK_TIMEOUT specifies a time limit for how long DDL statements will wait in a DML lock queue. The default value of zero indicates a status of NOWAIT. The maximum value of 1,000,000 seconds will result in the DDL statement waiting forever to acquire a DML lock.
If a lock is not acquired before the timeout period expires, then an error is returned.
从解释看,很好理解,该参数表示了执行DDL语句时需要等待DML锁的超时时间,默认0表示当无法立即获得DML锁时,会立即抛出NOWAIT,并且支持session级修改。
实验:
SQL> show parameter ddl_lock_timeout
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
ddl_lock_timeout integer0
SQL> desc t;
Name Null? Type
----------------------------------------- -------- ----------------------------
TID NOT NULL NUMBER(38)
CLS_NAME NOT NULL VARCHAR2(30)
session1:
SQL> update t set cls_name='a' where tid=1;
0 rows updated.
session2:
SQL> drop table t;
drop table t
*
ERROR at line 1:
ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
Elapsed: 00:00:00.00
session2:
SQL> alter session set ddl_lock_timeout = 10;
Session altered.
SQL> drop table t;
drop table t
*
ERROR at line 1:
ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
Elapsed: 00:00:10.01
- DDL_LOCK_TIMEOUT的作用
- ddl_lock_timeout
- DDL_LOCK_TIMEOUT
- DDL_LOCK_TIMEOUT --Oracle 11g DDL 的 wait选项
- Oracle 变量之 DDL_LOCK_TIMEOUT
- Oracle 11g ddl_lock_timeout
- DDL With the WAIT Option (DDL_LOCK_TIMEOUT)
- 作用域::的作用
- 作用域的作用
- ::的作用
- !!的作用
- Spring的作用、Struts的作用、Hiberante的作用
- 电容的作用?电容器的作用?
- 电话交换机的作用,程控交换机的作用
- 电容的作用?电容器的作用?
- 网络地址的作用,子网掩码的作用
- enum的作用以及主要的作用
- JavaScript 的 “-” 的作用
- 近200篇机器学习&深度学习资料分享(含各种文档,视频,源码等)
- 找最大公约数
- 链式队列
- struts2中的ognl表达式
- 机器学习与数据挖掘
- DDL_LOCK_TIMEOUT的作用
- 欧拉项目18题
- ssh不到Linux虚拟机几个原因
- 黑色的夜
- Animation & Property Animation 使用
- Linux系统安装
- 自定义UIView实现在屏幕上画画并记录路径
- IOS程序编译报错
- 将一个字节存储的2位BCD码解码