Oracle Instance Recovery detailed

Source: Internet
Author: User

When does an instance recovery occur? When your database server is powered down abnormally, an instance recovery occurs when you restart the database. Instance recovery is done automatically by the database without the intervention of the DBA. Of course, there is a prerequisite: Data files, online log files, control files must not be corrupted.

We use the experiment to analyze the whole process of instance recovery!

1. Before shutting down the database, let's take a look at the SCN of several checkpoints.

Sql> select checkpoint_change# from V$database;

checkpoint_change#

------------------

1455180

--The database checkpoint maintained in the control file the SCN number is actually the smallest checkpoint in all data file heads SCN

Sql> select file#,checkpoint_change# from V$datafile;

file# checkpoint_change#

---------- ------------------

1 1455180

2 1455180

3 1455180

4 1455180

5 1455180

6 1455180

--Control the data file saved in the checkpoint SCN: When a checkpoint action is complete, Oracle stores the SCN of each data file separately in the control file

Sql> select file#,checkpoint_change# from V$datafile_header;

file# checkpoint_change#

---------- ------------------

1 1455180

2 1455180

3 1455180

4 1455180

5 1455180

6 1455180

--Checkpoint SCN in file header of each data file

The SCN of these three checkpoints is consistent, followed by an abnormal power outage, restarting the machine.

2, this command can simulate abnormal power

sql> shutdown abort;

ORACLE instance shut down.

3. Monitor Alarm Log

[Oracle@guoyj trace]$ tail-f Alert_bxocp.log

Starting background Process VKRM

Tue Dec 11 22:54:41 2012

VKRM started with pid=24, OS id=12500

Tue Dec 11 22:58:11 2012

Shutting down instance (abort)

License High Water mark = 3

USER (ospid:12479): terminating the instance

Instance terminated by USER, PID = 12479

Tue Dec 11 22:58:12 2012

Instance shutdown complete

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.