Oracle 11g OCP Notes (1)--Oracle 11g Architecture Overview

Source: Internet
Author: User
Tags oracle developer

Reference documents: 41593811

1. Oracle Series Products

1.1 The server is divided into database server, application server and Enterprise Manager. Where Enterprise Manager includes database control application server control and Grid control.

1.2 Oracle development tools include

Internal language--sql and Plsql

External language Java C, etc.

Oracle Developer Suite and more

1.3 Oracle Applications

Two

2. Preparation of knowledge

Oracle concept;

Table, row, column, etc, basic query, disk, memory and other concepts, the required size.

3.

3.1 Single-instance architecture

The instance resides in RAM and CPU, temporarily, the database exists on disk and can be deleted before it exists.

Instances consist of memory and background processes, an SGA (shared), a server process corresponding to a PGA, can be automatically managed.

Summary: A relationship between a user process, a server process, a client, an instance, and a dataset.

3.2 Distributed Data Set architecture

Distributed environment
• Real-time application cluster (RAC)----Multiple instances to open a database
• Stream----Multiple Oracle servers propagate transactions to one another
• Data protection----The primary database to update the standby database

Determine if it is a single instance

Select parallel from V$instance; --NO Single Instance
Select Protection_level from V$database; --Standby database protection, unprotected not protected

SELECT * FROM dba_streams_administrator;--has not been configured and returns no rows.

4. Memory structure
sga--the system global Zone (shared memory).
• Database Cache (buffer cache)--can be set, can be automatically managed, is a dynamic parameter.
• The log buffer---the same size, cannot be automatically managed, is a static parameter.
• Shared Pool
• Library Cache-recently executed code
• Data dictionary Cache--stores the most recently used object definitions.
Pl/sql Area--pl/sql Object
· SQL query and SQL function result cache (11g version new feature)
• Large pond (large pool)--optional
· Java pools (Java pool)--optional
• Flow pools (streams pool)--optional
• Column Memory Area (inmemory)-a new feature of 12c that improves OLAP performance and is not enabled by default--optional

------------------other views such as the following Web site: https://www.cnblogs.com/lanzi/archive/2011/08/08/2131412.html

pga--Program Global Zone (dedicated memory).
• Temporary tables
• Sort Rows
• Merge bitmaps
• variables
• Call stack

PGA Information Query V$pgastat

5. Process structure:

Note the interaction of the typical instance and database.

On Linux and UNIX, all processes are separate operating system processes, each with its own process number.
On Windows, the entire instance has only one operating system process (Oracle.exe), and the Oracle process runs as a standalone thread in this thread.
· Smon Systems Monitor (System Monitor, Smon)
· Pmon processes monitor (Process Monitor, Pmon)
· Dbwn database writer, dbwn
· LGWR Log writers (log writer, LGWR)
· CKPT checkpoint process (Checkpoint process, CKPT)
· Mmon Management monitor (Manageability Monitor, Mmon) to use when-----awr

· MMNL Management monitor (Manageability Monitor, Mmon) to use when-----awr, Mmon copy process
· Mman memory Manager, Mman-automatic memory management is used.
· ARCn Archive Process (Archiver, ARCn)
· Use when reco--distributed transactions

1) Systems monitor (System Monitor, Smon)
The primary task is to install the database by locating and validating the control files, opening the database by locating and validating all data files and online log files, and performing various internal management tasks such as comparing the available space in the data file after opening the database.
2) Process Monitor (Pmon)
Pmon is started when the session is created and destroyed at the end of the conversation. Pmon monitors all server processes, the session exits unexpectedly, the transaction is rolled back, and the resource is freed.
3) database writer (DBWN)
The session typically does not write data or changes to the disk, and the session writes data or changes to the cache area.
Dbwn writes to the disk file in the following four scenarios.
• No buffers available
• Excessive dirty buffer data
• Three-second timeout
• Check points encountered
DBWN does not do any action when committing a transaction.
4) Log writers (log writer, LGWR)
When a session makes any changes to a block in the data cache, it writes the change vector to the log buffer before it applies the changes to the block. To ensure that no work is lost, these change vectors must be written to disk in a way that minimizes latency. LGWR writes the contents of the log buffer to the online redo log file in real time. When the session issues a commit, LGWR writes in real time, and when LGWR writes the buffer to disk, the session hangs, and only then the transaction is logged as committed (and therefore irreversible).
LGWR is one of the biggest bottlenecks in the Oracle architecture. DML speed cannot exceed the speed at which LGWR will change the vector to disk.
In the following three cases, LGWR writes the dump log buffer to the online redo log file:
• The session sends a commit.
• Log buffer occupancy up to 1/3.
dbwn to write dirty buffer data to a file.
5) Checkpoint Progress (Checkpoint process, CKPT)
Ckpt initiates checkpoints, triggering dbwn to write dirty buffer data to disk.
8i before, every time interval, you need to set up checkpoints. 8i and after that, the DBWN uses an incremental checkpoint instead of a full check point.
When checkpoints occur: This is done only on request, or occurs when the database is closed in an orderly manner.
Alter system checkpoint; --Force Set checkpoint
6) Archive Process ARCN
In archived log mode, LGWR writes the log buffer to the online redo log file, and once the online redo log file becomes full, ARCN makes a copy of the online redo log file (archive redo log file), before ARCN successfully archives the online log file to the archive log file. overwriting the corresponding online redo log file is not allowed.


7) Process processing of database transactions
• The session writes data or changes to the data cache and writes the change vector to the log buffer before applying to the changed block.
· LGWR writes the data of the log buffer to the disk online log file in real time (when the log buffer fills 1/3, or the session issues a COMMIT transaction, or DBWN writes a dirty buffer).
· Dbwn writes to the disk data file at a certain time (full buffer, excessive dirty buffer data, three-second timeout, checkpoint request).
• When the online redo log file is full, ARCN archives the online redo log file to the archive log file.

6, the storage structure of the database.
1) Physical database structure
• Control File
• Online redo log files (Redo log file)
• Data File
• Instance parameter files (Instance Parameter file)
• Password files (Password file)
• Archive redo log files (Archive Redo log file)
• Alert log and trace file (alert log and Trance files)


2) Logical database structure
• Table Space (tablespace)
• Segment (Segment)
• Interval (Extent)
• Blocks (block)

3) Data dictionary

The metadata is stored in the system and Sysaux table spaces.
Data dictionary view:
· Dba_ All Objects
· All_ all objects that have access
· User_ objects for the current user

Such as:
Dba_tables All Tables
All_tables All tables that have access
User_tables the current user's table

Oracle 11g OCP notes (1)--Oracle 11g Architecture Overview

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.