Oracle Database blocking methods

Source: Internet
Author: User

The blocking mechanism is mainly used to control concurrent operations and block interference to ensure data consistency and accuracy. There are three ways to block Oracle databases: Shared blocking, exclusive blocking, and shared update blocking.

[B: 8f4f63b9bb] blocking type [/B: 8f4f63b9bb]

Oracle RDBMS blocking can be divided into the following three types:

1. Internal Blocking

Internal blocking is used to protect the internal structure of ORACLE. It is implemented inside the system and cannot be accessed by users. Therefore, we do not need to know much about it.

2. DDL-level blocking (Dictionary/syntax analysis blocking)

DDL-level blocking is also controlled by oracle rdbms, which is used to protect consistency and integrity when data dictionaries and Definitions change. It is automatically locked when the system performs syntax analysis on SQL definition statements. Dictionary/syntax analysis blocking is divided into three types:

(1) dictionary operation lock: used to lock the data dictionary when operating on the dictionary. This lock is exclusive and thus can only operate on one dictionary at any time.

(2) dictionary definition lock: Used to prevent syntax analysis during dictionary operations, so as to avoid modifying the structure of a table while querying the dictionary.

(3) table definition lock: used when an SQL statement accesses a table, it prevents the items related to the table in the dictionary from being modified.

3. DML-level blocking

DML-level blocking is used to control data manipulation in concurrent transactions to ensure data consistency and integrity. The blocking objects can be tables or rows.

Oracle can automatically block user data for data manipulation. However, if authorization is available, a blocking is implemented to meet the needs of concurrent manipulation. DML blocking can be implemented by a user process in explicit locking or by implicit SQL statements.

DML locks can be blocked in the following three ways:

(1) shared blocking (SHARE)

(2) EXCLUSIVE Blocking)

(3) share update Blocking)

Here, SHARE and EXCLUSIVE are used for table blocking, while share update is used for row blocking.

  • 1
  • 2
  • 3
  • 4
  • Next Page
[Content navigation]
Page 1st: Three Oracle Database blocking methods Page 2nd: Three Oracle Database blocking methods
Page 3rd: Three Oracle Database blocking methods Page 4th: Three Oracle Database blocking methods

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.