Three steps for Oracle startup

Source: Internet
Author: User

It takes three steps to start the Oracle database. When we directly enter startup to start the database, the database has implicitly executed the three steps together.

In fact, the Oracle startup process includes the startup routine, loading the database, and opening the database. Every time you complete a step, the database enters a specific environment to ensure that the database enters a consistent state.

This article is a simple experiment on the files to be opened in these three steps and the database status after each step is executed. When performing each step, we can use alert_orcl.log to observe what oracle does in each step.

1. startup routine

Each started database must correspond to at least one routine. It is composed of a group of Logical Memory Structures and background processes.

When the database is started, these memory structures and background processes are allocated, initialized, and started.

In this step, Oracle data only reads the content of the parameter file, but creates various Logical Memory Structures and background service processes for the routine. At this time, the database cannot use any files in the database.

SQL> startup nomount
Oracle instance started.

Total system global area 285212672 bytes
Fixed size 1218968 bytes
Variable Size 83887720 bytes
Database buffers 192937984 bytes
Redo buffers 7168000 bytes

We manually remove the initialization parameter file and test the files used in each step:

First rename the initialization file (Database startup failed)

: [Oracle @ myhost DBS] $ MV spfileorcl. ora spfileorcl. ora. Bak

SQL> startup nomount
ORA-01078: Failure in Processing System Parameters
LRM-00109: cocould not open parameter file '/u01/APP/Oracle/product/10.2.0/db_1/dbs/initorcl. ora'

Rename the control file (Database startup is not affected ):

[Oracle @ myhost orcl] $ MV control01.ctl control01.ctl. Bak
[Oracle @ myhost orcl] $ MV control02.ctl control02.ctl. Bak
[Oracle @ myhost orcl] $ MV control03.ctl control03.ctl. Bak

SQL> startup nomount
Oracle instance started.

Total system global area 285212672 bytes
Fixed size 1218968 bytes
Variable Size 83887720 bytes
Database buffers 192937984 bytes
Redo buffers 7168000 bytes

2. Load the database

The parameter file used to start the instance records the location and storage information of the control file. When the database tries to load the database during the startup process, it will find the control file according to this path and open it.

The control file records the database name, the location and name of the data file, and other information about the physical structure of the database. At this time, the database will read this information, but will not open the data file, just to open the data file to prepare.

When a database is loaded, the system does not open data files or redo log files. At this time, the database is still closed.

In this status, the database administrator can perform the following operations:

1. Rename the database data file.

2. Maintain redo log files. Such as adding or deleting a log file or changing the name of a log file.

3. Perform full database recovery

4. Change Database Archiving

3. Open the database

When the database is opened, the routine will find the corresponding redo log file and data file based on the information in the control file.

If any redo log file or data file listed in the control file is corrupted, the database cannot be opened normally. The system can check whether these files are available only when the database is opened.

At this time, the data files and log files are all open, and the administrator cannot maintain these files.

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.