DDL_LOCK_TIMEOUT Behavior in 11G (Doc ID 779569.1)

Last updated on DECEMBER 06, 2016

Applies to:

Oracle Database - Enterprise Edition - Version 11.1.0.6 and later
Information in this document applies to any platform.
***Checked for relevance on 01-Dec-2015***

Symptoms

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.

Cause

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 hundreds of Community platforms