Oracle Architecture (K1) « Różności …

Różności …

27 grudnia 2010

Oracle Architecture (K1)

Zaszufladkowany do: Bazy danych,Oracle — Tagi: — Jacek @ 11:17

The term database refers to the physical storage of information, and the
term instance refers to the software executing on the server that provides access to
the information in the database.

Oracle’s database structures include tablespaces, control files, redo log files, archived
logs, block change tracking files, Flashback logs, and recovery backup (RMAN) files.

tablespace is a logical structure. Each tablespace is composed of physical structures called datafiles.
Oracle9i introduced the concept of Oracle Managed Files (OMFs), which enable
your database to automatically create, name, and delete, where appropriate, all the
files that make up your database.

The control file contains locations for other physical files that form the database: the
datafiles and redo log files.
It also contains key information about the contents and
state of the database, including:
• The name of the database
• When the database was created
• Names and locations of datafiles and redo log files
• Tablespace information
• Datafile offline ranges
• The log history and current log sequence information
• Archived log information
• Backup set, pieces, datafile, and redo log information
• Datafile copy information
• Checkpoint information

Datafiles contain the actual data stored in the database, the tables and indexes that
store data, the data dictionary that maintains information about these data structures,
and the rollback segments used to implement concurrency.

The first block of each datafile is called the datafile header (checkpoint structure).
From a physical point of view, a datafile is stored as operating system blocks.
From alogical point of view, datafiles have three intermediate organizational levels:
datablocks, extents, and segments. An extent is a set of data blocks that are contiguouswithin
an Oracle datafile. A segment is an object that takes up space in an Oracledatabase,
such as a table or an index that is composed of one or more extents.
OracleDatabase 10g added a Segment Advisor that greatly simplifies reclaiming
unusedspace in current database versions.

Redo log files contain a “recording” of the changes made to the database as a
resultof transactions and internal Oracle activities. In addition, redo log files are used
for “undo” operations when a ROLLBACK statementis issued.
If you do decide to suppress redo logging for certain operations, you would
include theNOLOGGING keyword in the SQL statement (index creation, podczas
odtwarzania nie będzie utworzony – trzeba będzie utworzyć go ponownie).
In addition tousing the NOLOGGING keyword in certain commands, you can also mark
a tableor an entire tablespace with the NOLOGGING attribute. This will suppress redoinformation
for all applicable operations on the table or for all tables in thetablespace.
Oracle writes synchronously to all redo log members.
ALTER DATABASE ARCHIVELOG (od Oracle 10g)
LOG_ARCHIVE_START = TRUE (w initialization file, do 10g)
LOG_ARCHIVE_DEST = C:\ORANT\DATABASE\ARCHIVE
LOG_ARCHIVE_FORMAT = ORCL%t_%s_%r.arc

An Oracle instance can be defined as an area of shared memory and a collection of
background processes.
The area of shared memory for an instance is called the SystemGlobal Area, or SGA.
Oracle Database 10g introduced Automatic Shared Memory Management (ASM).
Whenever the MEMORY_TARGET (new to Oracle Database11g) or SGA_TARGET initialization
parameter is set, the database automatically distributesthe memory among various SGA
components providing optimal memory management.

The database buffer cache holds blocks of data retrieved from the database.

The shared pool caches various constructs that can be shared among users. Forexample, SQL queries
and query fragments issued by users and results are cached sothey can be reused if the same statement
is submitted again. PL/SQL functions arealso loaded into the shared pool for execution.
The sharedpool is also used for caching information from the Oracle data dictionary, which isthe
metadata that describes the structure and content of the database itself.

The redo log buffer caches redo information until it is written to the physical redolog files stored on a disk.

Large pool provides memory allocation for various I/O server processes, backup, and recovery,
and provides session memory where shared servers and Oracle XA for transactionprocessing are used.

Java pool provides memory allocation for Java objects and Java execution, including datain the
Java Virtual Machine in the database.

Streams pool provides memory allocation used to buffer Oracle Streams queued messages in the SGA
instead of in database tables and provides memory for capture and apply.

Dynamic initialization parameters available for these pools include LARGE_POOL_SIZE, JAVA_POOL_SIZE,
and STREAMS_POOL_SIZE. These are automatically setif MEMORY_TARGET or SGA_TARGET is specified.

The PGA (Process Global Area) consists of session memory and a private SQL area. Thememory amount can
be controlled by setting the PGA_AGGREGATE_TARGET initializationparameter. (automatyczne zarządzanie
od 10g) As of OracleDatabase 11g, PGA memory allocation is automatically tuned along with the SGA memory
allocations by setting MEMORY_TARGET.

Background Processes:

Database Writer (DBWn)
Writes database blocks from the database buffer cache in the SGA to the datafileson disk.

Log Writer (LGWR)
Writes the redo information from the log buffer in the SGA to all copies of thecurrent redo
log file on disk.

System Monitor (SMON)
SMON performscrash recovery when the instance is started after a failure and coordinates
andperforms recovery for a failed instance when youhave more than one instanceaccessing
the same database, as with Real Application Clusters. SMON alsocleans up adjacent pieces of
free space in the datafiles by merging them into onepiece and gets rid of space used for sorting
rows when that space is no longer needed.

Process Monitor (PMON)
Watches over the user processes that access the database.

Archiver (ARCn)
Reads the redo log files once Oracle has filled them and writes a copy of the usedredo log files
to the specified archive log destination(s).

Checkpoint (CKPT)
Updates datafile headers whenever a checkpoint is performed.

Recover (RECO)
Automatically cleans up failed or suspended distributed transactions.

Dispatcher
Optional background processes used when shared server configurations aredeployed.

Global Cache Service (LMS)
Manages resources for Real Application Clusters and interinstance resourcecontrol.

Job Queue
Provides a scheduler service used to schedule user PL/SQL statements or proceduresin batch.

Queue Monitor (QMNn)
Monitors Oracle Streams message queues with up to 10 monitoring processessupported.

Automatic Storage Management (ASM) processes
RBAL coordinates rebalancing of activities for disk groups. ORBn performs theactual rebalancing.
ASMB provides communication between the database andthe ASM instance.

The Data Dictionary
A set of metadata that describes the data structureincluding table definitions and integrity constraints.

Brak komentarzy

Brak komentarzy.

Kanał RSS z komentarzami do tego wpisu.

Przepraszamy, możliwość dodawania komentarzy jest obecnie wyłączona.

Strona startowa: www.jaceksen.pl