Oracle Concepts-Database File overview

Source: Internet
Author: User
Tags oracle database backup

Oracle Concepts-database files are summarized as follows:

Oracle contains three basic files:

1: Data file

2: Controlling Files (Control file)

3: Online redo log files (online redo log file)

The concept of file (files) for Oracle databases:

Oracle database Architecture The final component is reflected in the physical files that are stored on disk, Oracle has several types of data files, and each data file has a different purpose.

A: Database data file B: Control file C: Online redo log file D: Parameter file E: Other Database related files

The above documents are described below:

1: Database Data files

A data file is a physical file that is stored on disk, which is used to store database data, and the database data file is written only by the DBWR process.

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

2: Control files

Control file is a database binary file contains a lot of database information, including database name, data log file, if the control file is invalid, the Oralce database can not be successfully started.

Because control files are important, Oracle allows you to copy multiple control file backups, and it's good practice for DBAs to put multiple control files on different disks.

3: Online redo the concept of the log file (online redo logs)

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

When disk damage occurs, you can use backup Oracle files to replace the data stored on the disk, if the backup data is many days ago, you will lose some data.

Fortunately, Oracle saves these operations transactions in the online redo day file, allowing the lost transaction operations to re-enter the database through this file.

This means that Oracle is able to recover lost data when the Oracle database is started by online redo log files.

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

4:oralce parameter file

The parameter file (sometimes called Init.ora) contains the configuration information needed at Oracle startup, and the parameter file allows us to locate control files, write trace files, and other Oracle information.

If there is no parameter file, Oracle will not be able to start, Oracle allows you to have a client parameter file--pfile or server-side parameter file (SPFILE)

No special boot is now started with the SPFile file.

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:oracle creates such files in a number of different situations, which are created when the database is unexpected, or if the session fails, or

An exception to let Oracle interrupt, or Basic Oracle Operations Command (query table, DML,DDL, TL) and so on.

2:alert log: This is an ordinary log file for Oracle data.

3:networking Configuration files (network profiles) are used to configure oralce different network components, such as: Tnsnames.ora and Listener.ora

The 4:oracle data package contains the basic ORALCE programs that allow Oracle to run.

After discussing these data files, let's look at the different state of the Oracle database in the startup, the role of these parameter files.

Two: The role of Oracle files with different Oralce startup status.

1:close---> Nomount status

The following work is required:

First read initialization file:

In the $oracle_home/dbs

First, find Spfilesid.ora.

If you don't find it, find Spfile.ora.

If you don't find it, find Initsid.ora.

The above is the order in which to start looking for three files.

Second: assigning SGA

Third: Start the background process

I think the above two steps are equivalent to establishing ORALCE instance

IV: Open alertSID.log files and trace file

2:nomount-->mount State

Perform the following tasks:

First: Associate the database with the instance that has been started

Second: The control file is found in the control file location specified in the parameter file and then the read is turned on

Third: Read the control file, get the data file (s) and the online Redo day file (in online redo log files), just get the name, but do not detect and care whether this The existence of the redo log file.

3:monnt-->open

Open the data file and

Online redo log files (online redo day files)

If this time the data file and the online redo log file are wrong

This time it will be an error.

Checks the consistency of online redo files and data files, if inconsistent,

Will do the related consistency of cleanup work.

The contents of control file:

1: Name and identifier of the database

2: Time stamp for database creation

3: The name of the table space and the table space of the database

4: Record the location of the data file and the online redo log file:

5: Contains the sequential sequence number of the online redo log

6:checkpoint Information

The starting point and technical point of 7:undo segments

8:redo Log Archive online log archive information

9:backup Information (Backup information)

Attention:

Read startup initialization information when Oracle is started,

The initialization information contains the location of the control file

The control file contains the location of the online redo log files and data files

These three control files are the same size, and 3 control files are best placed in the

On different physical disks, when writing information to the control file

Concurrent write concurrently, so the contents of the 3 control files are the same,

But when reading, only the first one is read, if 3 control files

If there is a mistake, Oracle will not be able to start.

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.