Understanding Oracle Databases

Source: Internet
Author: User
Tags dedicated server

First of all, I think most people define a database as a collection of data that is called a database. In Chinese translation we usually make a library of what is called somewhere in the store. and storing a lot of data together is called a database, so this is also a common layman's perception. But the fact that the database is not just a simple storage of data together to form a library.

To put it simply, the database, or DB, is a base for providing data. It can save the data and allow the user to access useful information from it. To be exact, a database is a set of business data within an enterprise's accounting machine, which can be shared by all the available applications in this unit in the best possible way and with minimal data duplication . The business data in the database is the whole of the interrelated data which is stored together in a certain organization way .


I. The evolution of Oracle Database

Http://baike.haosou.com/doc/1180281-1248530.html


Ii. Classification of databases

Databases have large and small partitions, but the partitioning of these databases is not absolute.

For example, a few years ago the database was just a debut, the Access database is a large database, and now it can only be considered a small database.

Small databases are: Access, poxbase

Medium-sized databases are: Mysql, SQL Server, Informix

Large databases are: Oracle, DB2, Sybase


III. Authentication of the database (DBA Data Manager)

OCA Junior Certification

OCP Expert Certification

OCM Master Certification


Iv. the role of the database

It can support a wide range of hardware and operating system platforms, from desktops to large and super computers, providing a high degree of scalability for a variety of hardware architectures, supporting symmetric multiprocessor, clustered multiprocessor, large scale processors, and providing a wide range of international language support. Orcale is a multi-user system that automatically recovers from system failures in batch or online environments. The system provides a complete software development tool Developer2000, including interactive application generators, report printing software, word processing software, and a centralized data dictionary that users can use to build their own applications. Orcale represents data in the form of a two-dimensional table and provides SQL (Structured Query language) to perform basic database management functions such as querying, manipulating, defining, and controlling data. Orcale has a good portability, through its communication function, the microcomputer program can be the same as small or large computer orcale, and can pass data to each other. In addition, Orcale also has a C language with the access to electronic forms, graphics processing and other software. Orcale is a large database system, mainly suitable for large and medium-sized applications, or as a server-side database system in a client/server system.


V. Structure of the database

------         |--oracle Software
------ --------|------------------------------------------|--PGA (private)
---- ----------| ---------------------------------|--Memory--|
Oracle Server-|---------------------------------| --------|--SGA system Global Zone
---------------|---------------------------------|
---------------|--oracle Database--|--instance instance-|--process--|--foreground process:
---------------------------------|------------------------|--Background process: DBWR lgwr smon pmon CKPT ARCH othres
---------------------------------|
---------------------------------|------------------Control Files
---------------------------------|--Database database--| data Files
------------------------------  --------------------| log file (Redo log files)
------------------------------  --------------------| parameter files (Parameter file)
------------------------------  --------------------| password files (Password file)
------------------------------  --------------------Archive logs (log files)

SGA System Global Zone (sharedpool buffercache redobuffercache streampool javapool largepool)

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/73/C1/wKiom1YGMgawQOEFAALHpaFWG1c238.jpg "title=" Zontijiegou.jpg "style=" Float:none; "alt=" wkiom1ygmgawqoefaalhpafwg1c238.jpg "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/73/BF/wKioL1YGMgviLuUxAAEIA2Qtyzc817.jpg "title=" Oraclejiegou.jpg "style=" Float:none; "alt=" wkiol1ygmgviluuxaaeia2qtyzc817.jpg "/>

Physical Structure:

The database physical structure refers to the operating system physical files that make up the database

Data files
Log file (Redo log files)
Control files
Parameter files (Parameter file)
Corruption or accidental deletion of physical files destroys the physical structure of the database, resulting in data loss.

Parameter file

SELECT * from V$parameter; The contents of the #v $parameter are derived from the parameter file

is a text file that can be modified directly using a text editor, which only
is accessed when the database is established and the instance is launched, and the instance must be restarted to take effect after the file is modified.

functions as follows:
Set the size of the SGA
Set all default values for a database
Setting the scope of a database
Defining the physical properties of a database when the database is established
Specify the control file name and path
Optimize database performance by adjusting the memory structure

Control files

Select Name,value from V$paramater where name= ' control_files ';

Show parameter control;


Each Oracle database has a control file that maintains the global physical node of the database
Changes in all database structures will cause changes in the control file (also recorded in
Trace files, which are automatically completed by the Oracle background process), contain the following types of information:
Database name
Name and location of database data files and log files
Database Build Date
Database maximization parameters, such as: maxlogfiles,maxlogmembers,maxloghistory,maxdatadiles,maxinstances
A database requires only one control file, allowing the control file to be mirrored for security purposes

Redo log Files

The redo log file is used to record user modifications to the data or database administrator's revision of the database structure.
and provides a recovery mechanism when the media fails.
Redo log file Grouping management.
An Oracle database requires at least two sets of redo log files.
Each log file in the group is referred to as a group member. Each of the log file groups corresponds to 1 or more log files.

Redo log files are recycled, and when a redo log file is full, LGWR writes the log
To the next Redo log group, this is called log switchover.

Data File archive log file

SELECT * from V$archived_log;

Do not put on the storage



650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/C1/wKiom1YGMgajOGJgAAD7ezWa90Q094.jpg "title=" Wulijiegou.jpg "style=" Float:none; "alt=" wkiom1ygmgajogjgaad7ezwa90q094.jpg "/>


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/73/BF/wKioL1YGMgvQJPwjAACVTOZbIUk502.jpg "style=" float: none; "title=" wijiegou.jpg "alt=" Wkiol1ygmgvqjpwjaacvtozbiuk502.jpg "/>

Database Memory and processes:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/73/BF/wKioL1YGMgvw-IN_AAGiK92Qoxs010.jpg "title=" Neicenjichenjiegou.jpg "style=" Float:none; "alt=" wkiol1ygmgvw-in_aagik92qoxs010.jpg "/>

Instance (Instance): The SGA is automatically assigned when the database starts and multiple background processes (Background Processes) of Oracle are started. Memory regions and background processes are called instances.
In general, the database and the instance are one by one corresponding relationships, that is, there is one instance of a database. However, in Oracle's Parallel server architecture, the database and the instance are one-to-many relationships in which the same time the user is connected only to an instance, and when one instance fails, the other instances are automatically serviced.

Shared pool

Library buffers: The database cache holds SQL statements, parsing code, execution plans, etc.
Data dictionary buffering: Dictionary cache saves dictionary information such as table name, field name, and other object definitions and permissions
Shared pool Size setting parameter shared_pool_size.

Data buffer Cache

Data buffers are used to store data that is read from a disk data file and shared for all users. When you modify data, you first take the data out of the data file and store it in the data buffer.
Use the least Recently used principle (LRU) as a management mechanism to save the most recently used data blocks.
Its size is determined by the parameter db_block_buffers.

Log buffers Redo buffer

The log buffers are used to store modification information for the database.
Log files are written by the log process when log data reaches a certain amount in the journal buffer.
The dimension size is defined by Log_buffer.

Sort District Sort Area

The sort area provides memory space for SQL statements that have ordering requirements.
In Oracle, the user data is sorted in two regions, one in the memory sort area, and one when the disk temporary segment is used, and the disk temporary tablespace is automatically sorted when the sort memory is not enough.
Parameter sort_area_size to set the size of the sort area

Grand Pool Large

Large pool for Database backup recovery Tool Rman (Recovery Manager) or multithreaded server (multithreaed server MTS, which allows multiuser processes to share very few server processes, corresponds to a dedicated server process dedicated Server, which corresponds to a user process that is in process one by one of the servers).
Its size is determined by large_pool_size.

Java Pool

Oracle 8i, Oracle 9i added support for Java, which is used primarily for Java language development.
Its size is determined by the Java_pool_size parameter.

Program Global Zone PGA

The PGA is an area of memory that contains data and control information for a single user or server that is automatically assigned by Oracle when a user process connects to Oracle and creates a session.
The PGA is a non-shared zone, as long as the shared user stores the variables and arrays when programming. Released at the end of the user's reply.
Show parameter PGA;

Process

Oracle processes are divided into user processes, server processes, and background processes. The user process is automatically generated when the user runs the application, and the server process is responsible for processing requests from the user process

Foreground process (server process) background process

DBRW is called the data write process, and when the dirty list reaches a certain length, DBWR writes the data to the disk and flushes the buffer
LWGR is called the log write process, which is responsible for writing log data to the log file when the logging buffer reaches saturation
Smon called system monitoring process, performing instance recovery at instance startup, cleaning up temporary segments that are no longer in use, free space for merging data files
Pmon is called a process monitoring process that performs a process recovery when a user process fails, is responsible for cleaning up the internal storage and freeing the resources used by the process.
Arch is called the archive process, which copies the full log file to the archive log file. Occurs only under Archive mode (Archivelog)
Ckpt is called the checkpoint process, which usually notifies LGWR to write logs and evokes DBWR to write all modified chunks of memory into the data file when the log is switched.
A SNP is a job process that is used to periodically run a user's job and can be seen as a dispatch service for PL/SQL statements or stored procedures

This article is from the "NJ Niche" blog, please be sure to keep this source http://liqingwen.blog.51cto.com/9853378/1698414

Understanding Oracle Databases

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.