Oracle's blockade mechanism

Source: Internet
Author: User
Tags table definition oracle database

The main purpose of the blockade mechanism is to control the concurrent operation, to block the jamming and to ensure the consistency and accuracy of the data. There are three ways to block Oracle database: Shared blockade, exclusive lockdown, shared update lockdown

[B:8F4F63B9BB] Blockade type [/B:8F4F63B9BB]

The type of blockade for Oracle RDBMS can be divided into the following three categories:

1, the internal level blockade

The internal lockdown is used to protect the Oracle internal structure, implemented internally by the system and inaccessible to the user, so we don't have to know much about it.

2, DDL-level blockade (dictionary/grammar Analysis Blockade)

DDL-level closures are also controlled by Oracle RDBMS, which protects the consistency and integrity of data dictionaries and data definitions as they change. It is the system automatically locks when parsing SQL definition statements without user's doing. The dictionary/Grammar analysis blockade is divided into three categories:

(1), dictionary Operation Lock: For the dictionary operation, lock the data dictionary, this blockade is exclusive, thus protecting any one moment can only operate on a dictionary.

(2) dictionary definition Lock: Used to prevent parsing while doing dictionary operations, so as to avoid changing the structure of a table while querying the dictionary.

(3), table definition Lock: For an SQL statement to properly access a table, prevent the dictionary related to the table items are modified.

3. DML level Blockade

The DML level blockade is used to control data manipulation in concurrent transactions, to ensure data consistency and integrity, and the blocking object can be a table or a row.

With the user's data manipulation, Oracle can automatically block the manipulated data, but if there is a control authorization, the additional blockade is imposed to meet the needs of concurrent operations. The DML blockade can be explicitly locked by a user process or implemented implicitly by some SQL statements.

There are three types of blocking methods for DML locks:

(1), shared blockade mode (SHARE)

(2), exclusive blockade mode (EXCLUSIVE)

(3), shared update blockade (SHARE update)

Where share,exclusive is used for table closures, SHARE update is used for row closures.

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.