Instance recovery with the SCN of Oracle

Source: Internet
Author: User

A simple understanding of Oracle's SCN is its own time function, like the Linux system's own time, and Oracle has its own set of time.

When you clean the database shutdown immediate or use ALTER system checkpoint will write the value of the SCN to 4 locations, 3 of which are in Controlfile and 1 in the datafile header

the three SCN inside the Controlfile were : 1, System checkpoint SCN 2, DataFile checkpoint SCN 3, stop SCN

Where this stop SCN is a null value when the database is in normal use

the SCN inside the datafile header is : Start SCN

1. Clean Shutdown when

       when CLEAN SHUTDOWN  checkpoint occurs, and at this time datafile STOP SCN in the control file START SCN .   When the open database is checked, Oracle checks that the START SCN in Datafile header and the SCN in Control file datafile are the same,  if the same , then check whether the Datafile header Start scn and STOP SCN in Control file are the same, if the same, the database will open normally, otherwise it will need recovery.

When the database is opened, it is stored in the Control File in the Stop SCN it will revert to NULL value , this indicates that datafile is open in normal mode.

2. non-normal shutdown

If the shutdown (shutdown abort) is not normal, after the Mount database, you will see that the stop SCN is not equal to the SCN in other locations , instead , it is equal to NULL, which means that Oracle does not checkpoint at shutdown, and the next boot must be Instance Crash recovery(instance recovery).

Note One thing:

(1) When starting the database, if a stop SCN = NULL is found, it means that instancecrash recovery is required;

(2) When starting the database, if it is found that the start SCN with the datafile header is not equal to the datafile SCN stored in Controlfile, it indicates that Media recovery



Instance recovery with the SCN of Oracle

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.