Dba_oracle Basic Architecture (concept) (some concepts that each Oracle developer and maintainer must know about the underlying architecture of Oracle)

Source: Internet
Author: User
Tags oracle developer

2014-07-26 Baoxinjian

I. Basic concepts of Oracle Architecture

1. Oracle's overall architecture is divided into three parts

    • The first part: System Global Area (SGA)
    • Part Two: program Global zone and background process
    • Part III: Oracle's Files

2. From functional angle to those division

    • Storage structure
      • Includes: Control files, data files, and log files
      • Role: These files form the physical storage structure of Oracle.
    • Memory structure
      • Includes: System global Area (SGA) and program Global Zone (PGA)
      • Function: Using the most memory is the SGA, which is also one of the most important parameters affecting the system performance of the database.
    • Process structure
      • Includes: foreground process and background process
      • foreground function: The foreground process service process and the user process are run according to the actual needs, and end immediately after the need ends.
      • Background role: A background process is a number of operating system processes that start automatically after the Oracle database starts.

Ii. Oracle Storage Architecture-Physical and logical structure concepts and associations

1. Physical Structure

    • Mainly describes the external storage structure of Oracle database, that is, how to organize and manage data in the operating system
    • Operating system-related

2. Logical Structure

    • Describes the internal storage structure of an Oracle database, which is the process of describing an Oracle database from a technical concept vendor, such as deteriorating organization, managing data
    • OS agnostic

3. Association of physical and logical structures

The logical structure of the table space corresponds to the physical structure of the data file, that is, when creating a tablespace to specify a data file, but a table space can correspond to multiple data files.

The size of the tablespace is the sum of the size of the data file he contains.

The data file also corresponds to the data block in the operating system, and the data file is in the form of a data block, which exists in the operating system.

Third, Oracle Storage Structure- A detailed description of the fabric structure

1.6 Types of database files

    • Main documents
      • Data files
      • Log file
      • Control files
    • Other files
      • Parameter file
      • Temporary files
      • Pre-allocated files

2. Data files

2.1 Characteristics of data files

Each data file is associated with only one database. Cannot correspond to two databases at a time.

A tablespace can contain one or more data files, which means that the size of the tablespace is the sum of the size of the data file he contains.

A data file can belong to only one table space

2.2 Basic concepts of data files

Table spaces have user default tablespace and zero table space

The user's default tablespace can consist of one or more data files.

A temporary tablespace is a temporary file that we specify with the Tmpfile option.

Used to hold temporary data resulting from a sort operation.

When a sort operation is performed, the server process places temporary data into the temporary table space if the temporary data exceeds the size of the sorting area.

However, the data is eventually stored in the data file, whether it is the user's default tablespace or the temporary table space.

3. log files

3.1 Types

Redo log file (Redo log)

Archive Journal file (Archive Log)

3.2 Basic concepts of log files

Used to record database changes, which is the transaction log for the user.

When it comes to process recovery and media recovery, we need to use redo logs, and if there is no redo log, the only means of recovery that the user can perform is to recover from the last full backup.

The database must contain at least two redo log groups, and these redo log groups are used cyclically.

Assume that there are three log groups in a database

During the initial stage of the log file write process, the transaction changes are written to the log Group One, when the log group is fully written, Oracle automatically logs the switch, and uses the three log groups as a loop. When all logs are full, archive logs (backups of inactive redo logs) are generated if an archive is required

By using archived logs, you can keep all of your redo history records. Use a copy of the data file and redo history to fully recover the database when media corruption occurs in the database.

4. Control files

4.1 Basic concepts of control files

Oracle also updates the control files during regular operations to prepare for the next use.
When a user establishes a control file, it is recommended that the user establish multiple copies and place them on a different physical drive (under different disks) if possible. If the device crashes, the user has a good control file to start and restore the database, if not recovery will be very complex.

Four, Oracle Storage architecture- logical architecture

1. Table Space

1.1 Concept of table space

    • The largest logical storage structure, which corresponds to one or more data files,
    • The size of the table space is the synthesis of the size of the data file in which it is formation

1.2 Characteristics of Table spaces

    • Controlling database Data disk allocation
    • Limit the amount of disk space a user can use in a tablespace
    • Table space has Online/offline/readonly/readwrite
    • Complete backup and recovery of part of the data
    • Table spaces are expanded by data files, and the size of the tablespace equals the sum of the size of all data files that comprise the table

1.3 Automatically created table spaces

    • Example Instance Table space
    • Sysaux Auxiliary system table space
    • system table Space
    • Temp temporary table space
    • Undo Redo Table Space
    • User table Space

2. Paragraph

1.1 Concepts

    • A logical storage structure of a specified type in a table space, where he has one or more zones, and the segment consumes and grows storage space

Four types of 1.2 segments

    • Data (table) segment (Segment) stores all data in a table
    • Index Segment (index Segment) stores all index data for the best query on a table
    • Temporary segment (temporary Segment) stores data for temporary tables created during a table sort operation
    • Rollback segment (Rollback Segment) stores the position and value before modification, which is the undo mechanism of Oracle

3. Partitioning

3.1 Concepts

The disk area consists of a contiguous set of data blocks, a section of the disk area, a table space, a table space constituting a database

4. Block

4.1 Concepts

    • The minimum unit of I/O used by the database when the block is called Logical block and Oracle block
    • One data block corresponds to one or more physical blocks
    • The size of the block is determined by db_block_size and the size of the block is an integer multiple of the operating system block size.

4.2 The structure of a data block includes the size and storage of two parts

    • Size
      • Data Block title: Store data types and physical location of blocks
      • Table directory:
      • Row directory
    • Storage area
      • Spare area
      • Row Data area

5. Database-Table Space-segment-Block structure

Five, Oracle Basic architecture Diagram

1. Data flow and System module relationship

2. Basic structure diagram

Abalone New ********************

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.