Introduction to the basic structure of oracle Database Learning

Source: Internet
Author: User

To sum up the basic knowledge of oracle, oracle is composed of instances and databases. The structure is as follows:

Oracle databases consist of instances and databases:

* A database consists of data files (including oracle Data, indexes, table structures, and other data), control files (including operation information for each table), and log files (SQL statements for data operation) parameter files, password files, and log archive files (in archive mode) (used for log recovery when the server crashes or the hard disk is damaged)

* An instance consists of a memory structure (memory strutct) and background processor.

Memory Structure composition:

* PGA: Processor Global Area: the Global Area of the program. Each client accesses an oracle server with a PGA, which is used to save information about the customer's ticket.

* SGA: System Global Area: the Global area of the System. It is mainly used for oracle instances, including the shared pool, data buffer Area, and redo log buffer.

Shared pool ):

* Includes library cache and data directory cache. The library cache mainly stores the latest SQL check, compilation, and execution plans. You can reuse these statements when the same statement comes in the next time, avoid repeated checks for compiled execution plans. Data directory cache stores the field definitions and indexes of database data tables. The size of the shared pool directly affects the database performance.

Data buffer area: This area stores user data modification and query operations. The size of the memory area directly affects the database performance.

Redo log buffer area: stores the Operation Records of recent users on the database. This size has little impact on the database performance.

Background processes required by oracle include PMON, SMON, DBWR, LOGWR, CKPT, and others. Each of these processes has the following functions:

* PMON monitors the health status of PGA, releases dead PGA, recycles resources, and manages the lifecycle of PGA.

* SMON monitors SGA health, collects SGA fragment memory, and monitors instance health.

* DBWR maintains the data consistency between the data buffer area and the physical table.

* LGWR maintains the consistency between the memory data of the redo log buffer area and log files.

* CKPT sets checkpoints. When an oracle instance encounters a problem, it can be restored to the condition before the instance fails.

The oracle memory structure consists of blocks, zones, segments, and tablespaces. A block is the minimum structure of oracle in the memory. The zones, segments, and tablespaces are the top-up memory structure of oracle. Fast, too small data management, too large, and a large amount of data fragments. Analyze the specific situation.

A tablespace is the largest logical unit in oracle. A tablespace can belong to only one database. A database can contain multiple tablespaces, but by default it contains one system tablespace. Syntax for creating a tablespace:

Copy codeThe Code is as follows: create tablespace name
DATAFILE path [SIZE interger M | K]
LOGFILE path
[Autoextend on | OFF]

Client Connection Server Configuration:

Supplement later

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.