Before Oracle 11g, when there is a transaction on a table, you cannot perform DDL operations on the table at this time, or you will get an error immediately. In the 11g introduced the Ddl_lock_timeout this parameter, can wait for a period of time has not obtained the lock, will be error. I personally think that this new feature is not very useful, just know it.
Session1:
sql> select * from V$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition release 11.2.0.1.0-64bit Production
PL/SQL release 11.2.0.1.0-production
CORE &N Bsp 11.2.0.1.0 production
TNS for linux:version 11.2.0.1.0-production
Nlsrtl Version 11.2. 0.1.0-production
sql> drop table test purge;
Sql> CREATE TABLE Test (ID number (10));
sql> INSERT INTO test values (1); The
has created 1 rows.
session2:
sql> show parameter ddl_lock_timeout;
NAME TYPE value
----------------------------------------------------------
Ddl_lock_timeout integer 0
Sql> Set Timing on
sql> drop table test;
DROP TABLE Test
*
An error occurred on line 1th:
ORA-00054: The resource is busy, but the resource is specified as NOWAIT, or the timeout expires
Time used: 00:00:00.01
Sql> alter session Set ddl_lock_timeout = 10;
sql> drop table test;
DROP TABLE Test
*
An error occurred on line 1th:
ORA-00054: The resource is busy, but the resource is specified as NOWAIT, or the timeout expires
Time used: 00:00:10.01
Oracle 11g Ddl_lock_timeout