Oracle 参数 DDL_LOCK_TIMEOUT 官方解释,作用,如何配置最优化建议

本站中文解释

DDL_LOCK_TIMEOUT参数的值用于配置DDL语句(Data Definition Language,数据定义语言)执行之前需要等待获取表锁的时间。如果某个DDL语句无法在DDL_LOCK_TIMEOUT参数所设置的时间内获取到DDL锁,这个DDL语句就会失败。

正确设置DDL_LOCK_TIMEOUT参数的方法:
1.检查oracle数据库版本,以便确定支持的DDL_LOCK_TIMEOUT参数范围;
2.确定DDL锁可能被占用的最长时间,然后将DDL_LOCK_TIMEOUT参数设置为比最长时间大20%的时间尺度;
3.检查数据库不可事务性修改的组件,包括磁盘组、表空间,或者长时间不应用的实验代码,设置适当的超时时间;
4.定期检查DDL_LOCK_TIMEOUT 超时事件,以查看实际情况重新设置参数的合适值;
5. 一旦修改完成,最好验证一下,确认重新设置的参数无误后,提交更改并保存到服务器。

官方英文解释

DDL_LOCK_TIMEOUT specifies a time limit for how long DDL statements will wait in a DML lock queue.

Property Description

Parameter type

Integer

Default value

0

Modifiable

ALTER SESSION, ALTER SYSTEM

Modifiable in a PDB

Yes

Range of values

0 to 1,000,000 (in seconds)

Basic

No

A 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.

See Also:

  • Oracle Database
    Administrator’s Guide
    for more information about the DDL_LOCK_TIMEOUT parameter

  • Oracle Database
    Development Guide
    for information about nonblocking and blocking DDL


数据运维技术 » Oracle 参数 DDL_LOCK_TIMEOUT 官方解释,作用,如何配置最优化建议