Oracle進程結構
用戶進程
服務器進程
Oracle自身創建,處理連接到數據庫實例的用戶進程提出的請求
後臺進程
保證處理併發,和其他複雜數據操作,Oracle數據庫啓用的一組相互獨立的附加進程
Oracle存儲結構
邏輯結構
邏輯結構 | 內容 |
---|---|
表空間 table space | 一般而言,一個用戶對應一個表空間 |
段 segement | 表空間被劃分爲(數據段 索引段 臨時段 撤銷段) |
盤區extent | 分配磁盤空間的最小單位 |
數據塊 block | Oracle進行磁盤I/O的最低的粒度級別,不必和操作系統相同,但必須是它的倍數 |
物理結構
- 數據文件.dbf
- 控制文件.ctl
- 日誌文件.log
- 初始化參數文件init.ora
- 其他文件
Oracle服務器架構
概述
Oracle 服務器在架構上主要分爲內存 磁盤兩大塊:
1. 分佈在內存中的 PGA/SGA/其他後臺進程代碼
2. 存放在磁盤上的數據庫物理文件
SGA和其他服務器進程代碼構成一個Instance實例
內存
PGA(Program Gloabal Area)
系統給每個進程分配一個PGA來保存其局部數據和控制信息
PGA包含各種會話數據的堆棧空間以及正在執行的SQL語句所佔用的私有空間
Server processes that perform work on behalf of connected users and applications, and the memory and temporary storage used by these processes
服務器進程執行建立連接,建立會話的工作.將Oracle服務器進程,與用戶應用進程,以及他們所產生的臨時存儲聯繫到了一起Server processes parse and execute SQL statements, and retrieve and return results to the user or application.
服務器進程分析和執行SQL語句,獲得查詢結果,並把結果返回給發出SQL請求的用戶/用戶應用
SGA(System Global Area)
The shared memory areas used by the background processes
SGA是存放用戶間共享結構的區域
其他後臺進程
下圖中的PMON SMON DBWR .etc
The background processes, which are the operating system processes or threads that perform the work of accessing, storing, monitoring, and recovering user data, metadata, and control files associated with the database
磁盤
數據庫文件
The database, which is a collection of physical files on one or more disks
在Oracle看來,位於硬盤上實際存放數據的文件, 這些文件組織在一起, 成爲一個邏輯整體, 即爲 Oracle 數據庫. 因此在 Oracle 看來, “數據庫” 是指硬盤上文件的邏輯集合, 必須要與內存裏實例合作, 才能對外提供數據管理服務.
The database contains user data, metadata, and control structures.
數據庫包含用戶數據,元數據,以及其他控制結構Metadata, or data about the data, is the collection of information on disk that permits Oracle software to manage user data. An example of metadata is the data dictionary.
元數據,是磁盤上的一些特殊數據的集合,這些數據允許Oracle來管理用戶文件,數據字典就是一種元文件.Control structures (such as the control file and online redo log files) ensure the integrity, availability, and recoverability of user data.
控制結構(包含控制文件,redo操作日誌文件),保障了用戶數據的健壯性,可利用性,以及可恢復性