Oracle DML operation process

Source: Internet
Author: User
The user transmits the DML operation statement to the buffercache in sga through the process, and then updates the changed data block in the buffercache.

The user transmits the DML operation statement to the buffer cache in the sga through the process, and then updates the changed data block in the buffer cache.

DML operations. All Oracle processes are executed together!

The user transmits the DML operation statement to the buffer cache in the sga through the process, and then updates the changed data block in the buffer cache, then, the logwr process first transmits the database before the operation to the undo, and transmits the operation data to the redo. This process is faster (the redo log is a continuous write)

The dbwn process then writes the dirty data blocks in the buffer cache to the data file at an interval determined by the ckpt process.

The ckpt process runs as follows:

Write the control file and data header file once every 3 seconds or more frequently, and record the location (SCN (system change number) of the block that DBWN writes to the disk from SGA)

Then, the ckpt process immediately notifies the dbwn process after each execution to write the existing dirty data blocks to the data file.

When the dbwn process writes dirty data blocks to the data file, a checkpoint is generated)

Then ckpt updates the scn to the scn in the header file of the control file and data file, continue to notify dbwn to write the dirty data blocks in the buffer cache to the data file and dbwn to create a checkpoint and then wait for the notice of the ckpt Process

This cycle is the process of oracle dml operations!

Supplement later:

Introduction by another netizen:

1. Start the transaction;

2. Find the required data block in the buffer cache. If no data block is found, load it into the buffer cache from the data file;

3. The transaction modifies the buffer cache data block. The data is identified as "dirty data" and written into the log buffer;

4. transaction commit. The LGWR process writes the "dirty data" in the log buffer to the redo log file;

5. When a checkpoint occurs, the CKPT process updates the information in the file header of all data files, and the DBWn process writes the dirty data in the Buffer Cache to the data file.

Note: checkpoint: The ckpt process triggers oracle to perform the checkpoint action, and dirty blocks in the data buffer are written in redo records but not written to datafile) the contents are written to the data file and the site space is released. It is completed by the dbw background process and the scn of controlfile and datafile is modified.
In general, manual execution (alter system checkpoint) is because you want to delete a log, but the log does not have content synchronized to the data file, you need to manually check the point to synchronize data, then you can drop logfile group n.

Related reading:

Oracle DML Process

PL/SQL ORA-14551: cannot perform DML operations in queries solved

Common MySQL DDL, DML, and DCL languages (example)

Execute batch DML exercises for Oracle basic transactions and ForAll

Oracle DML Statement (insert, update, delete) rollback Estimation

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.