My Oracle Support Banner

DDL_LOCK_TIMEOUT Behavior in 11G (Doc ID 779569.1)

Last updated on JANUARY 30, 2022

Applies to:

Oracle Database - Enterprise Edition - Version and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Information in this document applies to any platform.


DDL_LOCK_TIMEOUT is not waiting for the specified seconds before issuing the ORA-00054 error as mentioned in the documentation for ALTER TABLE...ADD COLUMN statements. 
However, it works while issuing DROP TABLE when another session has inserted a record into the table and not committed.

To reproduce the issue:

1) In a SQLPlus session, insert a record into a table, and DO NOT commit it.

2) In another SQLPlus session,

    - alter session set DDL_LOCK_TIMEOUT = 30 (30 seconds)
    - issue a DDL (like ALTER TABLE) on the same table after setting up

This results as expected in the ORA-00054: resource busy error.  This error should not be returned before the specified 30 seconds, but it does.
However, when the table is dropped in the second session, it waits 30 seconds before raising the error.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.