Summary of Oracle database architecture, oracle Architecture

Source: Internet
Author: User

Summary of Oracle database architecture, oracle Architecture

 

Oracle DB Architecture
An Oracle DB server consists of one Oracle DB and one or more database instances. An instance consists of a memory structure and background processes. Whenever an instance is started, a shared memory zone called the system global zone (SGA) is allocated and background processes are started.
The database includes the physical structure and logical structure. Because the physical structure and logical structure are separated, the access to the logical storage structure is not affected when you manage the physical storage of data.

Oracle architecture ensures that the logical structure is abstracted from the physical structure

Oracle DB Memory Structure
Oracle DB creates and uses memory structures for various purposes. For example, memory is used to store running program code, data shared between users, and dedicated data regions of connected users. An instance has two associated basic memory structures:


System global Zone(SGA): A Shared Memory Structure Group of the SGA component. These components contain data and control information of an Oracle DB instance. SGA is shared by all servers and background processes. Examples of data stored in SGA include cache data blocks and shared SQL regions.


Program global Zone(PGA): memory area that contains data and control information of a server process or background process. PGA is the non-shared memory created by Oracle DB when the server process or background process is started. Access to PGA by server processes is mutually exclusive. Each server process and background process has its own PGA.

 

SGA is the memory zone that contains instance data and control information. SGA contains the following data structures:

 
Database buffer cache: Used to cache data blocks retrieved from the database
Redo log Buffer: Used to cache redo information for instance recovery until it can be written to the physical redo log file stored in the disk.
Sharing pool: Used to cache various structures that can be shared between users
Large pool: Provides an optional area for large memory allocations for some large processes (such as Oracle backup and recovery operations) and I/O server processes.
Java pool: Used for all Java code and data in session-specific Java Virtual Machine (JVM)
Stream pool: Oracle Streams uses it to store information required for capture and application operations

Common background processes in non-RAC and non-ASM environments include:

 
Database write process (DBWn)
Log writing process (LGWR)
Checkpoint Process (CKPT)
System Monitor process (SMON)
Process Monitor process (PMON)
Restore process (RECO)
Job Queue Process
Archiving process (ARCn)
Queue monitor process (QMNn)

The files that make up Oracle DB can be divided into the following categories:

 
Control File: Contains data related to the database itself, that is, the physical database structure information. These files are critical to the database. Without these files, you cannot open the data file to access the data in the database.
Data Files: Contains database user or application data, as well as metadata and data dictionary
Online redo log files: Used for database instance recovery. If the database server crashes but no data files are lost, the instance can use the information in these files to restore the database.


The following additional files are important to the successful running of the database:
Parameter file: Defines the configuration when an instance is started.
Password File: Allows sysdba, sysoper, and sysasm to remotely connect to the instance and perform management tasks.
Backup File: Used for database recovery. If the original file is damaged or deleted when a media fault or user error occurs, the backup file is usually restored.
Archive and redo log files: Contains real-time historical records of instance data changes (redo. You can use these files and Database backups to restore lost data files. That is to say, archive logs can restore restored data files.
Tracking File: Each server and background process can write associated trace files. When a process detects an internal error, the process dumps information about the error to the corresponding trace file. Some information written to the tracking file is provided by the database administrator, while other information is provided by Oracle Support Services.
Warning logFiles: these files contain special trace entries. Database warning logs are message logs and error logs listed in chronological order. Oracle recommends that you regularly view warning logs.

Logical and physical database structure
The database has a logical and physical structure.


Solution
The "solution" is a collection of database objects owned by database users. The solution object directly references the logical structure of the database data. Solution objects include structures such as tables, views, sequences, stored procedures, synonyms, indexes, clusters, and database links. Generally, the solution object includes all the content created by the application in the database.
Databases, tablespaces, and data files

Tablespace
A database is divided into multiple logical storage units. These units are called "tablespaces" and are used to combine related logical structures. For example, tablespaces generally divide all objects in an application into a group to simplify some management operations. You can use one tablespace to store application data and the other to store application indexes.


Data Block
From the bottom layer, Oracle DB data is stored in "data blocks. A data block corresponds to the physical database space with a specified number of bytes on the disk. The data block size of each tablespace is specified when the tablespace is created. The database uses and allocates free database space in the Oracle data block.


Zone
The logical database space at the next layer is "zone ". A zone is a specific number of adjacent data blocks (obtained through one allocation) used to store specific types of information.


Segment
The logical database storage layer above the zone is called a "segment ". Segments are a group of zones allocated for a logical structure. For example:

 
Data Segment: Each non-cluster table that is not indexed has a data segment, except for external tables, global temporary tables, and partition tables, each table in these tables has one or more segments. All data in the table is stored in the corresponding data segment. For partitioned tables, each partition has a data segment. Each cluster also has a data segment. The data of each table in the cluster is stored in the data segment of the cluster.
Index segment: Each index has an index segment that stores all its data. For partition indexes, each partition has an index segment.
Restore segment: Create an UNDO tablespace for each database instance. This tablespace contains a large number of restoration segments used for temporary storage of Restoration Information. The information in the restoration section is used to generate read consistency database information, and during database recovery, it is used to roll back uncommitted transactions for the user.
Temporary Section: The temporary segment is created by Oracle DB when you need a temporary workspace to execute SQL statements. After the statement is executed, the section of the temporary segment is returned to the instance for future use. Specify a default temporary tablespace for each user or a default temporary tablespace used within the database range.
Oracle DB dynamically allocates space. If the existing zones in the Section are full, some new zones will be added. Because the zones are allocated as needed, the areas in the segments may be adjacent or not adjacent to the disks.

Table space and data files
A database is divided into multiple "tablespaces". A tablespace is a logical storage unit that can be used to combine relevant logical structures. Each database is logically divided into one or more tablespaces. One or more data files are explicitly created for each tablespace to physically store all data in the logical structure.

The YSTEM and SYSAUX tablespaces are required when you create a database. These tablespaces must be online.
SYSTEM tablespace is used for core functions (for example, data dictionary tables ).
Auxiliary SYSAUX tablespaces are used for additional database components (for example, Enterprise Manager Repository ).

 

Database architecture: Structure Component summary:


Memory Structure:
System global zone (SGA): Database buffer cache, redo buffer, and various pools
Program global zone (PGA)
Process Structure:
User and Server Processes
Background processes: SMON, PMON, reco, DBWn, CKPT, LGWR, and ARCn
Storage Structure:
Logic: database, solution, tablespace, segment, partition, and Oracle Block
Physical: data files, control files, and redo log files


Oracle database architecture


Understand the terms in Oracle.



What is the architecture of the oracle database?

Www.knowsky.com/410200.html

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.