Oracle11gR2: DDL_LOCK_TIMEOUT

Source: Internet
Author: User
When updating a table, Oracle will add a tmlock to the table before submission to ensure that the table structure will not change. At this time, if another session executes alter on this table

When updating a table, Oracle will add a tmlock to the table before submission to ensure that the table structure will not change. At this time, if another session executes alter on this table

When updating a table, Oracle will add a tmlock to the table before submission to ensure that the table structure will not change.
At this time, if another session executes the alter or drop command on the table, the following error message will be obtained immediately:

Tony @ ORA11GR2> drop table t;
Drop table t
*
Row 3 has an error:
ORA-00054: the resource is busy, but specifies to get the resource in NOWAIT mode, or timeout is invalid

In Oracle11gR2, you can set the DDL_LOCK_TIMEOUT parameter for DDL wait.
For example, run
Alter session set ddl_lock_timeout = 30;
Let the drop table wait for 30 seconds. If the other session that locks the table to be deleted commits or rolls back the transaction within 30 seconds,
The drop table command will be executed, otherwise one ORA-00054 will be generated 30 seconds later: error.

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.