The origin of checkpoint for Oracle learning with inthirties

Source: Internet
Author: User

What is checkpoint?

What can checkpoint do?

How does checkpoint run?

 

This is a problem we need to understand when we understand the checkpoint concept. It is also the three problems that we often cannot understand when understanding the checkpoints.
We are not busy understanding these three files. The emergence of a thing must have its reasons, and the checkpoint is also true.
We all know that in our system, storage is the last place of ownership of data, and databases are even more like this. Only when data takes root has it entered the physical storage space, this data can be safely saved,
Therefore, if you want to ensure data security without loss, you can put them in a safe place in a timely manner. But on the other hand, entering the storage space will inevitably bring Io, however, this Io often leads to poor performance.
Trend. Therefore, to ensure data security and performance optimization at the same time, this must be done right in a timely manner. The two sides of everything bring happiness to research. This checkpoint is also here. For
Oracle is the main file that everyone knows. It is nothing more than a control file, a data file, and a redo log file. This is the three file types that Oracle database instances can run with high weights.

The control file is the information center of the database instance, so it is not necessary to talk about the data files. It is fundamental. redo log files are actually used to ensure data security during database crash. For these three files
The most common Io, log buffer writes to log file, Buffer
The dirty data in the cache is written in data files. The former is written in sequence. Writes from the past to the back, and switches to the next group until the write is full. The latter is different from the former and is not written continuously. It is a discrete type.
Different data needs to be written into different blocks. Different blocks need to be addressable, switched to the track, and so on. Reading is also true here, but reading is not the focus of this article, log
Buffer writes to lgwr. When the data is committed or rollback. Lgwr writes the log buffer to log file, which is called redo.
Log writing is synchronous writing. That is, when the data takes effect and is rolled back, the redo entries must be recorded on the physical storage, so that the instance can be restored after the crash operation. View data,
Data is stored in data file. When it is used, it is loaded into the buffer cache, modified and accessed, but the buffer
The data in the cache is inconsistent with that in the data file. Why? As mentioned above, the modified data (dirty
Data dirty data) is not immediately written to the data file. Therefore, dbwr write, commit, and rollback are not synchronous. In this case, if the instance crash, such as power failure or shutdown abort, the dirty data in the buffer cache cannot be recorded in the data file, isn't it that the data will be lost? Indeed, the data in the data file is not the same as the data in the crash. However, after we opened the database, we found that the submitted data can still be displayed, but the data that has not yet been submitted and has not been merged. Indeed, although the data in the data file in the database is inconsistent, Oracle has quietly paid for your last abort during the startup process. The redo log is mentioned above. This redo log is the method for implementing Oracle's pay-as-you-go. Oracle record redo records. Based on redo records, redo the data that has not yet been reflected in the data file. However, How Does Oracle know the redo content that you want to redo? Will it redo all the redo content, so as to ensure that the redo entries he has found are what we need, this is implemented through the checkpoint mentioned above.

 

Here, we have not introduced too much checkpoint, but we seem to describe more about databases. If we ensure the security of our data in the efficient operation process, it is actually a reminder that the checkpoint we mentioned does not guarantee the running status of the instance. In the last sentence, it is clear that the checkpoint aims to restore the database. It is determined when the database is restored. He has no other choice. Checkpoint is a common knowledge area in Oracle that is difficult and hard to understand, if you can first understand that the checkpoint is just a method used in the restoration process of the Oracle instance in the crash recovery, then you can learn the checkpoint first.

 

A penny looks at a leopard and looks like a leopard. This article only tells us about the origin of the checkpoint, how the checkpoint achieves its goal, how it is manifested in Oracle, And what misunderstandings we will have in cognitive checkpoint. In the subsequent articles, we will discuss them one by one.

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.