// oracle · timeouts

ddl_lock_timeout

Seconds a DDL statement waits for a DML lock before failing; 0 fails at once.

Par défaut
0
Range
0 to 1000000 seconds
Restart needed
Non
Default checked on
Oracle AI Database 26ai / 23ai

Ce que cela fait

Without it, DDL on a busy table fails immediately with ORA-00054 (resource busy and acquire with NOWAIT specified).

Valeur par défaut

0. 0 (Oracle 23ai/26ai).

Check the current value

SHOW PARAMETER ddl_lock_timeout

SELECT name, value, isdefault, issys_modifiable, isses_modifiable, ispdb_modifiable
FROM v$parameter
WHERE name = 'ddl_lock_timeout';

Change it

ALTER SESSION SET ddl_lock_timeout = 30;   -- this session

ALTER SYSTEM SET ddl_lock_timeout = 30 SCOPE=BOTH;

No restart: ALTER SYSTEM with SCOPE=BOTH applies immediately and is saved in the SPFILE. A session can also change its own value with ALTER SESSION. It can be set inside a PDB (ISPDB_MODIFIABLE = TRUE).

When to change it

Set it in deployment sessions so DDL waits briefly for in-flight transactions instead of failing.

What can go wrong

While DDL waits, it can queue behind and in front of other sessions' locks; keep the value short.

Questions about ddl_lock_timeout

What is the default value of ddl_lock_timeout in Oracle?

0. 0 (Oracle 23ai/26ai).

Does changing ddl_lock_timeout require a restart?

No. No restart: ALTER SYSTEM with SCOPE=BOTH applies immediately and is saved in the SPFILE. A session can also change its own value with ALTER SESSION. It can be set inside a PDB (ISPDB_MODIFIABLE = TRUE).

When should I change ddl_lock_timeout?

Set it in deployment sessions so DDL waits briefly for in-flight transactions instead of failing.

Back to all Oracle settings, or check the Oracle manual for every option.

// one client for every engine

Check ddl_lock_timeout on your own server

SQLly runs the query above against Oracle and the other engines in this reference, from one desktop app on macOS, Windows and Linux.