You are on page 1of 15

Unit – 2

Exploring the Oracle Database Architecture


Objectives
At the end of this chapter, you should be able to:
Learning Objectives
• To understand the Oracle 12c architecture,
including the various components contained in it.
Introduction
In this section we will explore and understand the
major components of the oracle architecture
including how the database and the instance work
together.
Oracle 12c Architecture
• Oracle 12c is one of the major high scale RDBMS in industry today.
• It is made up of two major components, which are:
1. The Physical database;
2. The Oracle instance.
• Physical database:
- consists of data files, redo log files & control files
• Oracle instance:
- made up of large memory area & a set of background processes.
- provides a means to connect to the database to manipulate data.
Oracle 12c Architecture
The Database – Physical Storage

Data files - This a repository of all the data in the database. All created and
modified data is kept here. We have bigfile which has a single data file as
compared to the normal data file that can comprise of multiple data files in a
single tablespace.

Control file - This file contains metadata of the database, its name when it was
create and locations of the data and redo log files. It also contains RMAN
information

Redo log file - This a repository of all the transactional information that relates to
any modification done on the data is kept. It is used to cater for instance failure
occurrences. When power is restored a roll forward action is initiated from the
redo log entries.
Oracle 12c Architecture
Archived redo log files- these are repositories that are used to backup the entries stored in
the redo log files. This ensures the integrity of the database when the database is re
created. Oracle 12c uses a feature called data guard to create a destination for all
archived log files, this is to increase high availability of the database and reduced
recovery time .

Initialization parameter files- when the instance starts the init<SID>.ora or spfile.ora is
accessed by the OS. It uses this file to establish the size of the SGA and its components
and the number of users that can be connected to it. It also has the locations of the
system files e.g. redo log, trace files, control files.

Alert Logs - Alert logs are used to manage system errors that occur during start up and
shut down and records all ALTER SYSTEM commands.
Trace file - Are used to manage the errors that occur when processes within the instanced
are occurring. They record PMON, QMON and SMON errors. They also monitor user
session errors. For example privilege overrides, memory allocation violations etc.
Oracle 12c Architecture
Password files- this file is used to authenticate Oracle system administrators. By default
SYS and SYSTEM user accounts reside here. When other users are created and assigned
SYSDBA and SYSOPER privileges their credentials are saved here

Back up files – this a repository of the physical files of the database in the case of a cold
backup (bit to bit) or creating incremental backups called backupsets (special formats)
ensuring effective space management
Oracle 12c Architecture
Oracle Instance

The Oracle instance is used to manage the user sessions


and processes associated with the database which
includes shared information like Locks, Data Dictionary
and SQL statements. We will explore the SGA in order
to understand the essence of the Oracle instance.
Oracle 12c Architecture
System Global area – A shared memory area allocated to each user. The SPFILE is used to
create the SGA and the values of the various parts of the SGA. It uses dynamic file
sizing option to cater for the multiple user sessions and data loads on the SGA. Though
a maximum SGA size can be specified but not recommended. Each unit of memory is
called a granule ranging form 4MB to 16MB.
Database buffer cache- Is used to temporarily store blocks of data that are copied from
hard disk to memory for manipulation.
Shared pool- Contains the library cache and data dictionary cache
Library cache contains information about SQL and PL/SQL statements
Data dictionary cache- a collection of tables owned by the SYS and SYSTEM schemas. It
contains metadata, privileges and roles assigned to users
Redo log buffer- Contains information of the changes made on the datafiles. Once 1/3 full
it writes the redo logs to the file on disk using LGWR
Oracle 12c Architecture
Large pool – is an optional component that is used for transaction that interact with more
than one database. For example RMAN parallel operations or operations that require
large memory blocks
Java pool- used by the JVM for java code and data used by a user session.
Streams pool- is used to allow the sharing of data within a distributed system. It is
allocated 10% of the shared pool memory
Program global area- is used to maintain user session connection information . In a shared
server setup all users share the connection using less memory on the server though
affects response times. In a dedicated setup each user has its own connection
configuration to the database.
Software code area- a memory location that contains read only code that is used by the
software to run the instance
Oracle 12c Architecture
Background processes
SMON- System Monitor is used to monitor the instance, if failures occur
it will retrieve transactional information from the redo log files.
PMON- Process Monitor is used to monitor the dropped connections. If
failure occurs it is used to clean up the database buffer cache and
release resources allocated to the session.
DBWn- Database writer is used to write changes made n the data blocks
of the cache back to the data files. 20 DBWn processes can be used
concurrently.
LGWR- is used to write the transactional information from the redo log
buffer back to the redo log files on disk
ARCn- Archiver process is used to write copies of the redo logs to back
up destinations to multiple devices as per the configuration.
Oracle 12c Architecture
Background processes

CKPT- The check point process is used to update the recovery


points. It updates header information of control and data files
to reflect the current changes with the usage of SCN(system
change number). It occurs every time a redo log entry occurs.
RECO- The recover process is used in a distributed setup to
ensure that changes made to data is sent to all replicas. If
errors occurs a rollback processes will be performed to ensure
data integrity is maintained.
Summary
In this session we learnt that:
 The Oracle Architecture is made up of two major
components:
 The Physical Database;
 The Instance.
 These in turn consist of multiple sub-components which help
the Oracle RDBMS to function well.
Thank You

You might also like