Oracle 11g Ddl_lock_timeout

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.