Quản trị cơ sở dữ liệu Oracle 08 architecture

32 179 0
Quản trị cơ sở dữ liệu Oracle 08 architecture

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Oracle Architecture Kết nối tới database • • Connection: giao tiếp user process database Session: kết nối cụ thể user tới database thông qua user process Kiến trúc Oracle Database Server Kiến trúc nhớ (memory structures) Kiến trúc nhớ SGA • Giới thiệu SGA (system global area) – Được cấp phát lúc khởi động instance giải phóng tắt instance – Được chia sẻ tất server process background process The Database Buffer Cache • • Nắm giữ copy data block đọc từ data file Được chia sẻ tất users The Log Buffer • • • Là buffer dạng vòng (circular buffer) Nắm thay đổi tác động đến database Chứa redo entry để redo thay đổi thao tác (ví dụ câu lệnh DML) The Shared Pool • • Là thành phần SGA Chứa: – Library cache – Data dictionary cache – The PL/SQL area – The SQL query and PL/SQL function result cache The Library Cache • The library cache vùng nhớ để chứa đoạn code thực thi gần nhất, hình thức phân tích cú pháp • Bằng cách lưu giữ đoạn code phân tích, sử dụng lại nhằm nâng cao hiệu suất The Data Dictionary Cache • Lưu trữ định nghĩa đối tượng sử dụng gần đây: table, index, user metadata • Immediately accessible to all sessions SMON, the System Monitor • • • Thực recovery (nếu cần) thời điểm khởi động instance Xóa segment tạm không dùng Hợp extents trống (free) liền từ điển liệu (từ điển quản lý table space) PMON, the Process Monitor • • Thực recovery user process bị lỗi • Đăng ký thông tin instance dispatcher process với network listener Chịu trách nhiệm dọn dẹp DB buffer cache giải phóng tài nguyên mà user process dùng CKPT, the Checkpoint Process • • Chịu trách nhiệm việc ghi lại địa redo byte Buộc DBWn ghi tất block bị thay đổi vào đĩa ARCn, the Archiver • • Copy redo log file vào thiết bị lưu trữ sau log switch xảy Đây process không bắt buộc lại quan trọng Database Storage Structures Physical Storage Structures Datafiles • • • Phải datafile (SYSTEM, SYSAUX) Chứa tất liệu database Lưu trữ kiến trúc DB mức luận lý (ví dụ: table index) Control Files • • Mỗi Oracle database control file Nó chứa thông tin sau: – Tên database – Tên vị trí datafile redo log file – Các số thứ tự quan trọng khác (sequence number) nhãn thời gian The Online Redo Log Files • Online redo log có: – Ít nhóm – Mỗi nhóm file -> Mỗi database online redo log file Other Database Files • • • • The instance parameter file The password file Archive redo log files Alert log and trace files The Logical Database Structures • Oracle abstracts the logical from the physical storage by means of the tablespace The Data Dictionary • contains metadata that describes the database: both physically and logically, and its contents • Contains user definitions, security information, integrity constraints, performance monitoring information • provides a set of views: DBA_ , ALL_ , USER_ The Data Dictionary • • • USER* Views: – USER_*: Views that start with USER_ list only the objects owned by the currently logged in user ALL* Views – ALL_*: Views that start with ALL_ list only the objects the currently logged in user has permissions to access DBA* Views – DBA_*: Views that start with DBA_ list all objects unless restricted by the WHERE clause The Data Dictionary • To find the list of tables in current schema that have the column “EMPLOYEE_NUMBER” SELECT * FROM user_tab_columns • WHERE column_name = 'EMPLOYEE_NUMBER' To find the list of tables in schema accessible to the current user that have the column “EMPLOYEE_NUMBER” SELECT * FROM all_tab_columns • WHERE column_name = 'EMPLOYEE_NUMBER' To find the list of tables across schemas that have the column “EMPLOYEE_NUMBER” SELECT * FROM dba_tab_columns WHERE column_name = 'EMPLOYEE_NUMBER' The Data Dictionary • DICT (short for DICTIONARY) – View of All Views: SELECT * FROM DICT TABLE_NAME COMMENTS DBA_TAB_COLS Columns of user’s tables, views and clusters DBA_OBJECT_TABLES Description of all object tables in the database DBA_ALL_TABLES Description of all object and relational tables in the database DBA_TABLES Description of all relational tables in the database DBA_TAB_COLUMNS Columns of user’s tables, views and clusters DBA_TAB_COMMENTS Comments on all tables and views in the database DBA_TAB_PRIVS All grants on objects in the database DBA_VIEWS Description of all views in the database ……………… ……………… ... nhớ cho Oracle stream Process Structures DBWn, the Database Writer • • Ghi liệu bị thay đổi (dirty) database buffer cache vào ổ đĩa (disk) DBWn ghi liệu khi: – buffer đầy liệu – Quá nhiều liệu. .. allocation) cho: – Bộ nhớ phiên làm việc (session memory) cho multi-threaded server Oracle XA interface – I/O server processes – Oracle backup and restore operations The Java Pool The Streams Pool • • The... cache pl/sql area The SQL Query and PL/SQL Function Result Cache • • Giúp Oracle server lưu trữ kết câu truy vấn nhớ Giá trị trả cache, sẵn sàng cho lần chạy The Large Pool • Cung cấp nhớ lớn

Ngày đăng: 29/08/2017, 10:16

Mục lục

    Kết nối tới database

    Kiến trúc Oracle Database Server

    Kiến trúc bộ nhớ (memory structures)

    Kiến trúc bộ nhớ trong SGA

    The Database Buffer Cache

    The Data Dictionary Cache

    The PL/SQL Area

    The SQL Query and PL/SQL Function Result Cache

    The Java Pool và The Streams Pool

    DBWn, the Database Writer

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan