Before learning Oracle, we must first understand the operation mechanism of Oracle itself. We can understand and apply it in depth. Let's let's explain how Oracle work, and the article is from shallow to deep, step by step to understand Oracle.
This chapter mainly introduces the content:
First, the basic composition structure and classification of the process;
Second, the responsibility of each process;
Third, the basic structure of memory;
This chapter explains some content (such as parameters) is specifically for Oracle9i, please pay attention!
First, the structure of the process:
(1) The composition of the Oracle process is as follows (Figure 1):
Figure one
Single processes, in the same period, only one user is allowed to instance, such as the MS-DOS environment.
Multi-process is in the same period, allowing multiple users to access instances, such as Windows Series, UNIX Series.
(2) In a multi-process environment, the basic sequence of the Oracle operating system is as follows:
User Process -> Service Process <- Background Process. The user process provides the necessary service to the service process for the service process, the service process response service, and the background for performance.
(3) Oracle's most basic background process includes:
DBWR: Database write process;
LGWR: log write process;
PMON: Process monitoring process;
SMON: System monitoring process;
LCKN: Locking Process;
DNNNNN: Scheduling process:
SNNNNN: server process;
CKPT: Checkpoint Process;
Arch: Archive process;
Reco: Restore Process;
(2) Basic function of the process
(1) User Process: Generate the process of requesting services, such as the process generated by the SELECT statement;
(2) Service Process: Responding to user processes, providing services for services;
(3) Background process: In order to improve performance, the background process auxiliary processing service process.
(4) DBWR: Responsible for the process of writing operations, DB_Writes can set the number of DBWR processes.
(5) LGWR: The write operation responsible for the log;
(6) CKPT: Check the processes, it can not exist, usually when there are a lot of data files and log files, in order to improve the write performance of the log, there is a parameter: checkpoint_process can be set, default is False ,Do not use;
(7) DNNNN: Scheduling process, scheduled a plurality of processes, improve performance, you can create, delete the schedule process, and set the number of DNNNNs when new databases. (8) Others: The other background processes will be introduced.
Third, Oracle memory structure
Oracle's memory structure is shown below (Figure 2)
Figure II
(1) Software Code: Used to store executable program code.
(2) System Global Zone (SGA): When the data is operated, he stores temporary data into the cache, including data datagical information such as data, log, some privilege information, etc. The intermediate data of all database operations.
(3) Program global zone: Store data for operating a single process.
(4) Sort zone: Data used in database sorting memory, with a parameter sort_area_size to set the size of sort memory.
This article introduces here, we will continue to introduce the operation order between processes, and how to coordinate the specific operation!