DDL Wait option and ddl_lock_timeout in oracle 11G
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
PL/SQL Release 11.1.0.6.0 - Production
CORE 11.1.0.6.0 Production
TNS for Solaris: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - Production
SQL>
1) From a session, i am doing a delete on a table
2) From second session, i am trying to add a column and drop a column.
As per this website,
http://www.oracle.com/technology/pub/articles/oracle-database-11g-top-features/11g-schemamanagement.html
adding a column also should be blocked if ddl_locK_timeout is set to 0.
But, why oracle is not blocking adding a column. Dropping a column is however being blocked
From the session where i am running alter table command.
USERNAME OWNER OBJECT_NAME TYPE SID SERIAL# STATUS OSUSER MACHINE
--------- ---------- ------------------ --------------- ---------- ---------- -------- ---------- -----------------
SCOTT SCOTT T TABLE 123 22948 INACTIVE oracle myhost
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
PL/SQL Release 11.1.0.6.0 - Production
CORE 11.1.0.6.0 Production
TNS for Solaris: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - Production
SQL> alter table t add (mycol varchar2(20));
Table altered.
--> Here i thought as per the website that i get ORA-54 error..
SQL> alter table t drop column mycol;
alter table t drop column mycol
*
ERROR at line 1:
ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
SQL> show parameter ddl_
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
ddl_lock_timeout integer 0
enable_ddl_logging boolean FALSE
SQL>
Thanks,
Giridhar