Oracle Storage Architecture

Source: Internet
Author: User
Tags one table

The storage structure of Oracle database is divided into logical storage structure and physical storage structure.

First, logical storage structure

The logical storage structure mainly describes the internal storage structure of Oracle database, that is, how to organize and manage data in Oracle database from a technical concept. Therefore, the logical storage structure is independent of the operating system platform and is created and managed by the Oracle database.

From a logical point of view.

    1. A database is made up of one or more table spaces.
    2. A table space (tablespace) consists of a set of segments,
    3. A segment (segment) consists of a set of zones,
    4. A zone (extent) consists of a batch of database blocks,
    5. One or more physical blocks for a database block

Database (database)

A database is a warehouse that organizes, stores, and manages data in accordance with its data structure.

tablespaces (table space)

A tablespace is a logical division of a database, and a table space can belong to only one database. A tablespace (tablespace) is the largest logical unit that corresponds to one or more data files, and the size of the tablespace is the sum of the size of the data file it corresponds to. All database objects are stored in the specified table space. But the main object is the table, so called the table space.

Segments (paragraph):

A segment is an important organizational structure for a tablespace, which is a generic term that occupies data file space, or a collection of space used by database objects, and segments can have a table segment, an index segment, a rollback segment, a temporary segment, a cache segment, and so on. Types of segments (segment type detailed)

extents (panel area)

is a logical unit of database storage space allocation, which consists of contiguous blocks of data. The first segment is made up of one or more extents. When all the space in the middle is fully used, Oracle assigns a new scope to the segment.

Data Block (data block)

is the unit of storage space in the Oralce management data file, the smallest unit of I/O used for the database, and its size can be different from the standard I/O block size of the operating system.

Second, physical storage structure

The Oracle physical storage structure consists of:

    1. Data file,
    2. Online log files (online redo log file),
    3. Control file, which consists of a
    4. Archive log files,
    5. Parameter files,
    6. Alert files,
    7. Trace files,
    8. Backup files

Data file:

A database can consist of more than one data file, which is a data file that actually holds database data. A data file is an operating system file. The objects (tables and indexes) of the database are physically stored in the data file. When we want to query the data of a table, if the table's data is not in memory, then Oracle will read the data file where the table resides, and then put the data into memory. The characteristics of the data file are:

    1. A data file can belong to only one database.
    2. Data files can be set to autogrow.
    3. One or more data files make up the table space.
    4. A data file can belong to only one table space.

Control file:

A database must have at least one control file, which controls the "Physical structure information" of the database stored in the file, because he is storing the physical structure of the database information, so he is particularly important. These physical structure information includes:

    1. The name of the database.
    2. The name and location of the data file and the online log file.
    3. Timestamp when the database was created.

In order to better protect the database, we can mirror the control file. The contents of each control file are the same. Mirroring the control file, even if one of the control files has a problem, it will not affect the database corruption, data loss. When you start the database, Oracle opens the database based on the information from the data files and online log files in the control file.

Online redo log file:

A database can have more than one online log file, and an online log file contains a redo record (Undo Records). The online log file records changes to the database, such as when an unexpected change to the data is not written to the data file in a timely manner, then Oracle will be based on the online log file Information to get these changes, and then write these changes to the data file. This is also the meaning of the online log file. The only function of Redo records in an online log file is to perform recovery of the instance. For example, an accidental system power-down, Causes the in-memory data to not be written to the data file. Then Oralce will revert to the State before the failure based on the Redo Record Feature Pack database in the online log file.

Archive log files (Archive log file):

is a copy of the online log file, and he records the history of changes to the database.

parameter files (parameter file):

Typically, the initialization parameter file (initialization parameter files) is referred to. The parameter file includes the initialization parameter file and the server-side parameter file (server parameter files). The parameter file is read when the database is started. The SGA is then allocated based on the parameters in the parameter file and a series of background processes are started. The parameters of the database and instance are stored in the parameter file.

Alert log file:

Is the alert log file, which records the major activities of the database and the errors that occurred. The alert file records the significant activities and errors that occurred in the time. The name of the alert file is in the format AlertSID.log. The location of the alert file is determined by the initialization parameter Background_dump_ DESC is specified.

Trace files (trace log file):

is the trace log file, and each server process and background process writes trace files. For example, when an error occurs in the background process, Oracle writes the wrong information to the trace file. The DBA can view the errors that occur in the process based on the information of the trace file. Trace files are written to two directories. Information about the server process is written to the directory specified by the initialization parameter User_dump_desc. The information about the background process is written to the directory specified by the initialization parameter Background_dump_desc. With the time the trace file is written full, the DBA can manually delete the trace file, or you can limit the size of the trace file. Initialize parameter Max_dump_file_ Size to limit the sizes of the trace files.

Back up files (backup file):

It is the recovery (recover) data that is used to restore the database when a media corruption occurs in the database.

Reference:

Storage Structure relationships for Oracle

Oracle Storage Architecture

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.