Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Big World Oracle system (unfinished)

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Writing this article is mainly inspired by two books to write some personal notes, share knowledge, and recommend books to you to read 1, "harvest, not only Oracle" 2, "Oracle kernel technology" does not involve programming, design architecture ideas, if there is a programming book is even better! There are official documents must be read, English level is poor to read the translation, the real authority comes from the official. I feel that when I know Oracle Internal, I try to look at things as a designer as possible, especially if you can write the underlying process in C #.

Let's talk about it together, then the database is divided into Instance and Database, we know that user access must be through the instance to access the database, which is a hard rule. What is in the instance and database? users have to access it through PGA. What is this? let's take a look at it.

PGA, when our request through Socket (in fact, there are many kinds of processing, do not want to go into details), our instructions will first go to the PGA area is Program Global Area, this area will save session attributes, store bound variables, that is, our user connection information, and then when the user process establishes a session with the database, the system will check out the user's relevant permissions and store them in this area. There is a process called Server process in PGA to complete these tasks. And it's private, not shared!

SGA,System Global Area, shared memory area, Instance is actually SGA+process (background), there are many plates in SGA, I think shared_pool,database buffer cache,Redo log buffer is relatively important, because each component is very important, here is only a relative concept, SGA also contains Java pool,Large_pool, etc. Our simple query statement says select * from t to talk about its process.

Shared_pool shared pool is actually very useful. When we first access the instance from PGA to SGA, a unique identity HASH will be generated in PGA. At this time, a unique identity will be found in SGA's shared pool. If HASH is found, the corresponding values will be found in the corresponding data cache buffer, and the values will be returned directly to the user. If it cannot be found, it will be troublesome, and he will display to judge whether the syntax is incorrect and whether the permissions are correct. To parse which way to query, we will first estimate the cost COST, compare the cost to choose a lower way to query, then when the action is completed, a unique hash value will be generated and stored in the shared pool, and then queried in the data cache buffer.

The data we want will be found in the data cache. SGA is the space opened up in memory. At this time, we can only go to Database to complete. Whether the data files in the query disk can not be found or can not be found, they must be returned to the user with the results, so a query statement is roughly completed.

Let's talk about the processes in the instance. We will find a lot of background processes under Linux, ps aux | grep oracle. I will talk about several main processes and functions, PMON,SMON,LCKn,RECO,CKPT,ARCH, including DBWR,LGWR, we understand these words in English! Very important, basically is the literal meaning of the English translation, next we all go to talk about, know how to work, responsible for what work, focus on Redo log and ARCH log function!

I haven't written the draft for more than 2 months. I'll continue to study it later. (this is the end of Oracle)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report