Oracle concept-database file Overview

Source: Internet
Author: User
Document directory
  • 1: close ---> nomount status
  • 2: nomount --> Mount status
  • 3: monnt --> open

Important references

Oracle contains three basic files:

1: Data File)
2: Control File)

3: Online redo log file)

Concepts of Oracle Database files:

The final component of the Oracle database architecture is reflected in the physical files stored on the disk. Oracle has several types of data files, each of which has different purposes.

A: database data file B: control file C: Online redo log file D: parameter file E: other database related files

The above files are described one by one below:

1: database data files

Data files are physical files stored on disks. These files are used to store database data. database data files are only written by the dbwr process.

These database data files are associated with tablespaces, including tables and indexes.

2: Control File

A control file is a database binary file that contains a lot of database information, including the database name and data log file. If the control file is invalid, the oralce database cannot be started successfully.

Because control files are very important, Oracle allows you to COPY Copies of multiple control files and store multiple control files on different disks is a good habit of DBAs.

3: Online redo logs)

Online redo log files are like a record that records every change in the Oracle database. When the Oracle database changes, these changes are regularly recorded in online redo log files, just like recording a movie in VCR.

When the disk is damaged, you can use the Oracle backup file to replace the data stored on the disk. If the backup data is stored many days ago, you will lose some data.

Fortunately, Oracle stores these operation transactions in the online redo days file, which allows the lost transaction operations to re-enter the database.

This means that Oracle can restore lost data when the Oracle database is started through online redo log files.

Note that Oracle requires two online redo log files. Oracle will first write information in the first file. When the first file is full, oracle will convert to the second log file and write the same log file, which will become the Oracle online redo log group.

4: oralce parameter file

The parameter file (sometimes called init. ora) contains the configuration information required for Oracle startup. Through the parameter file, we can find the control file, write the trace file, and other Oracle information,

If no parameter file exists, Oracle cannot start. Oracle allows you to have a client parameter file-pfile or the server parameter file (spfile)

The spfile file is used for startup without special start.

5. Other related Oracle files

In the directory below ORACLE_HOME, you will see a lot of different files, we mainly introduce the following:

1: Oracle trace files: in many different cases, Oracle creates such files. They are created when a database accident occurs, or the session fails, or

Exceptions interrupt Oracle, or basic Oracle operation commands (query tables, DML, DDL, Tl.

2: Alert Log: this is a common log file of ORACLE data.

3: networking configuration files are used to configure different network components of oralce, such as tnsnames. ora and listener. ora.

4: The Oracle data package contains the basic oralce program for Oracle to run.

After discussing the above data files, let's take a look at the different statuses of Oracle Database startup, the role of these parameter files.

Ii. Roles of Oracle files in different oralce startup statuses.

1: close ---> nomount status

You need to do the following:

First, read the initialization file:
In $ ORACLE_HOME/dbs
First go to spfilesid. ora
If not, find spfile. ora.
If not, find initsid. ora.
The above is the sequence of starting to find three files.
Second: allocate SGA
Third: Start the background process
In the above two steps, I think it is equivalent to creating an oralce instance.
4. Open the alertsid. Log File and trace file

2: nomount --> Mount status

Perform the following tasks:

First, associate the database with the started instance.
Second, locate the control file through the location of the control file specified in the parameter file and open and read the file.
Third, read the control file and obtain the name of the online redo log file, however, we do not check whether the data file and the online redo log file exist.

3: monnt --> open

Open Data File and
Online redo log files (online redo day files)

If an error occurs in the data file and online redo log files at this time
At this time, an error will be reported.

The consistency between online redo files and data files will be checked. If they are inconsistent,
Will clear related consistency.

Control File Content:
1: Database Name and identifier
2: database creation Timestamp
3: name of the tablespace and tablespace in the database
4: record the location of the data file and online redo log file:
5: contains the sequence number of online redo logs
6: Checkpoint Information
7: Start Point and technical point of Undo segments
8: redo log archive online log archiving information
9: backup information (backup information)

Note:
When oracle is started, it reads the startup initialization information,
The initialization information contains the location of the control file.
The control file contains the location of online redo log files and data files.

The size of the three control files is the same.
When writing information to the control file on different physical disks
The content of the three control files is the same,
However, only the first control file is read.
If an error occurs, Oracle cannot be started.

Related Article

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.