"Oracle" 8.Orecle Architecture analysis

Source: Internet
Author: User

Concept

What is an Oracle database?

Basically, there are two main components of the Oracle database-the instance and the database itself. The instance includes some memory structures and background processes, while the database refers to disk resources. Figure 1 will show you the relationship.

Example

This example analyzes the interaction process (SGA + PGA + background process).

The memory structure and the background process Contitute an instance. The memory structure itself consists of the system global Area (SGA), the program Global Zone (PGA), and an optional area. On the other hand, the mandatory background process database write process (DBWN), log write (LGWR), Checkpoint (CKPT) System Monitor (Smon), and Process Monitor (Pmon). Another optional background process is the archiver (ARCn), the recovery Device (RECO), and so on. The diagram illustrates the relationship between these components of an instance.

Description


Sga

The system global Area (SGA), the SGA is the primary memory structure. When Oracle database administrators talk about memory, they usually refer to the SGA. This area is divided into several parts of memory-buffer cache, shared pool, redo log buffer, large pool and Java pool.

Buffer cache

Buffer cache to store a copy of the data block retrieved from the data file. That is, when the user retrieves data from the database, the data is saved in the cache. Its size can be manipulated by initializing the parameter file in the Db_cache_size parameter Init.ora.

Shared pool

A shared pool is divided into two small memory-Library caches and dictionary caches. The library cache is used to store information for commonly used SQL and PL/SQL statements; Also by a least recently used (LRU) algorithm to manage. It also makes those statemens between shared users. On the other hand, the dictionary cache is used to define the size of objects in the database, such as columns, tables, indexes, users, permissions, and other stored information of the shared pool can be set by the initialization parameter file shared_pool_size parameter in Init.ora.

Redo Log Buffers

For each DML statement (INSERT, update, and delete), user execution will produce a redo entry. What is a redo entry? It is information about all data changes for the user. The redo entries are stored before the redo log buffers are written to the redo log file. To manipulate the size of the redo log buffer, you can use the Log_buffer parameter in the initialization parameter file in Init.ora.

Candidates

A large pool is an optional area of memory in the SGA. It is used to review the burden place of the shared pool. It can also be used for I/O processing. The size of the large pool can be set by the initialization parameter file large_pool_size parameter in Init.ora.

Java Pool

As its name, the Java pool is used in the Java Service Parsing command. It can be sized by initializing the parameter file in the Init.ora. Java_pool_size parameter setting

Pga

The program Global Region (PGA), Although the result analysis of SQL Statemen is stored in the library cache, the combined variable value is stored in the PGA. Why? Because it must be private or not shared between users. The PGA is also used for sorting areas.

Software Area code

The software area code is a location in memory where the Oracle application resides.

Background process

The Oracle background process is the work of the behind-the-scenes process and shared memories.

DBWN process

The database write (DBWN process) process is used to write data files from buffer cache data. Historically, database writes have been named DBWR. However, because some Oracle versions allow us to have multiple database writers, the name is changed to the DBWN process, where the n value is a number 0 through 9

Lgwr

The log writer (LGWR) process is similar to the DBWN process. It writes redo log buffers from the redo entries to the Redo log file.

CKPT

Checkpoint (CKPT) is a process that gives a signal to the DBWN process to write the buffer cache of data to a data file. It will also update the log file when the data file is switched and the control file header.

Smon

The System Monitor (Smon) process is used to recover a data file in the Redo log file Crach or instance of the system by applying an entry failure.

Pmon

The Process Monitor (Pmon) process uses a ROLLBACK transaction and frees other resources after a failed process cleanup work.

System Structure

A database is a disk resource, and is divided into two main structures: logical structure and physical structure.

Logical Structure

The Oracle database is divided into smaller logical units effeciently to manage, store, and retrieve data. Logical units are tables, segments, extents, and data blocks. The diagram illustrates the relationship between these units.


The relationship between Oracle's logical structure

Table Space

A table space is a logical grouping of database objects. A database must have one or more table spaces. In Figure 3, we have three tablespace-system tablespace, tablespace 1, and table Space 2. A tablespace is made up of one or more data files.

Paragraph

Table spaces are further decomposed into segments. A segment is used to store objects of the same type. That is, each table in the database will be stored in a specific segment (called a data segment) and each index database will also be stored in its own segment (called an index segment). The other segment types are temporary and rollback segments.

degree

A segment is further divided into the range. To some extent by one or more data blocks. When the database object is magnified, a range is assigned. is different from a table space or segment and cannot be named to some extent.

Data Block

A data block is the smallest unit stored in an Oracle database. The size of the data block is a specific number of bytes in the table and it has the same number of bytes.

Physical Structure

The physical structure is the structure of the Oracle database (in this case, the disk's files) are not directly manipulated by the user. The physical structure includes data files, redo log files, and control files.

Data Files

A data file is a file that is correspondens with a tablespace. A data file can be used by a table space, but a table space can have multiple data files.

Redo log Files

A redo log file is a file that is stored in a redo entry produced by a DML statement. It can be used for the recovery process.

Control Files

The control file is used to store information about the physical structure of the database, such as the size and location of the data file, the Redo log file location, and so on

An image of Oracle database architecture, clear understanding .....


Business Ideas

Analyze Oracle's architecture, get a deeper understanding of Oracle's operational mechanisms, feel a lot of, and easily learn the architecture, all to understand!



"Oracle" 8.Orecle Architecture analysis

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.