Basic knowledge of Oracle Architecture (entry-level level)

Source: Internet
Author: User
Tags contains log requires oracle database

Author: Lu Yang
Learning Oracle, it's best to understand Oracle's framework first. This has a holistic understanding of Oracle and has a farsighted role

1. Physical structure (composed of control file, data file, redo log file, parameter file, archive file, password file)

The data in one database is stored on disk in physical files, and when used, it is transferred into memory.
The control files, data files, redo log files, trace files and warning logs (trace files,alert files) belong to the database files;
Parameter file (parameter file) password files (password files) are non-database

1.1 Data file: A file that stores data. Data files typically represent the volume of an Oracle database based on the amount of disk space and quantity they use.
For performance reasons, each type of data is placed in a corresponding file or series of files, and the files are placed on separate disks.
Types
. Data dictionary. Data
. Redo data. Index
. Temporary data et cetera
1.2 Control files: Contains the necessary information to maintain and verify the integrity of the database, for example, the control files are used to identify data files and redo log files, and a database requires at least one control file.

Controlling the contents of a file
。 Database name
。 Table Space Information
。 Name and location of all data files
。 Name and location of all redo log files
。 The current log sequence number
。 Check Point information
。 About current status information for redo logs and archives

Controlling the use of files
The control file directs Oracle to other parts of the database file. When an instance is started, Oracle reads the name and location of the control file from the parameter file. Oracle opens the control file when the database is installed. When the database is eventually opened, Oracle reads the list of data files from the control file and opens each of the files.


1.3 Redo Log file: Contains a record of changes made to the database so that data recovery can be enabled in the event of a failure. A database requires at least two redo log files.
1.4 Trace files and warning logs (trace file and alert files)
Each background process running in instance has a trace file that is connected to it. Trace file records information about the major events encountered by the background process.

Alert log is a special trace file that has a trace file in each database, synchronizing messages and errors in the database.

1.5 parameter files: Includes a large number of settings that affect Oracle database instance functionality, such as the following settings:
。 Location of database control files
。 The amount of memory that Oracle uses to cache data read from disk
。 The selection of the default optimizer.

is related to the database file and performs two important functions
1〉 indicates the control file for the database
2〉 indicates the target of the archive log for the database


1.6 Archive: An offline copy of the redo log files that may be necessary for recovery from media failure.

1.7 Password files: Authenticate which users have permission to start and close Oracle routines.


2. Logical Structure (table space, segment, area, block)

Tablespace: The basic logical structure of a database, a collection of data files.
Segment: Is the space that an object occupies in the database.
Area: A large storage space that is reserved for data at one one-time.
Block: Oracle's most basic storage unit, specified when establishing a database.


3. Memory allocation (SGA and PGA)

SGA: The memory area that is used to store database information that is shared by the database process. It contains data and control information for the Oracle server, which is allocated in real memory on the computer where the Oracle server resides, if the actual memory is not enough to write to virtual memory.

PGA: Data and control information that contains a single server process or a single background process, contrary to the SGA shared by several processes, the PGA is an area that is used by only one process, and the PGA is allocated when the process is created and recycled when the process is terminated.

4. Background process
Includes data write processes (database WRITER,DBWR), log write processes (logs WRITER,LGWR), system monitoring (Systems Monitor,smon), process monitoring (processes Monitor,pmon), Checkpoint processes ( Checkpoint process,ckpt), archive process, service process, user process

Data write process: Responsible for writing changed data from the database buffer cache to the data file
Log Write process: Write changes in redo log buffers to online redo log files
System monitoring: Checking the consistency of the database if necessary, you will also start the recovery of the database when the database is open
Process monitoring: Responsible for cleaning up resources when an Oracle process fails
Checkpoint process: is responsible for updating database state information in control files and data files whenever changes in the buffer cache are permanently recorded in the database. The process changes the title of all data files to indicate the checkpoint when the checkpoint appears. In the usual case, the task is performed by LGWR. However, if the checkpoint significantly reduces system performance, the CKPT process can be run, separating the work of the checkpoint originally performed by the LGWR process.
Implemented by the CKPT process. For many applications, the CKPT process is unnecessary. Only when the database has many data files does the LGWR significantly degrade performance at checkpoints to make ckpt run. The CKPT process does not write blocks to disk, which is done by DBWR. The checkpoint_process parameter in the Init.ora file controls the enabling or enabling of the ckpt process. The default is false, which is to make it impossible.

Archiving process: Backing up or archiving a full log group for each log switch
Service process: User process Service.
User process: At the client, responsible for passing the user's SQL statement to the service process and getting the query data back from the server segment.

5, SCN (System changenumber): Change the number of systems, a system maintained by the internal serial number. When the system needs to be updated automatically increases, he is the system to maintain data consistency and sequential recovery of important signs.



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.