Nothing Special   »   [go: up one dir, main page]

ORACLE Architecture

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 23

Oracle Architecture

Oracle server:
• An Oracle server includes an Oracle Instance and an Oracle
database.  
• An Oracle database includes several different types of files:  datafiles,
control files, redo log files and archive redo log files.  The Oracle
server also accesses parameter files and password files. 
• This set of files has several purposes. 
• One is to enable system users to process SQL statements. 
• Another is to improve system performance. 
• Still another is to ensure the database can be recovered if there is a
software/hardware failure.
• The database server must manage large amounts of data in a multi-
user environment. 
• The server must manage concurrent access to the same data. 
• The server must deliver high performance.  This generally means fast
response times.
Oracle instance:
• The first component set is the set of background processes (PMON, SMON,
RECO, DBW0, LGWR, CKPT, D000 and others). 
• These processes perform input/output and monitor other Oracle processes to
provide good performance and database reliability. 
• The second component set includes the memory structures that comprise
the Oracle instance. 
• When an instance starts up, a memory structure called the System Global
Area (SGA) is allocated. 
• At this point the background processes also start. 
• An Oracle Instance provides access to one and only one Oracle database.   
Oracle database:
• Sometimes these are referred to as operating system files, but they are actually database
files that store the database information that a firm or organization needs in order to operate. 
• The redo log files are used to recover the database in the event of application program failures,
instance failures and other minor failures.
• The archived redo log files are used to recover the database if a disk fails. 
• Other files not shown in the figure include:
• The required parameter file that is used to specify parameters for configuring an Oracle
instance when it starts up. 
• The optional password file authenticates special users of the database – these are
termed privileged users and include database administrators. 
• Alert and Trace Log Files – these files store information about errors and actions taken that
affect the configuration of the database.
User and server processes:
• The processes shown in the figure are called user and server
processes.  These processes are used to manage the execution of SQL
statements.
• A Shared Server Process can share memory and variable processing for
multiple user processes.
• A Dedicated Server Process manages memory and variables for a single user
process.
Physical Structure – Database Files
• An Oracle database consists of physical files.  The database itself has:
• Datafiles – these contain the organization's actual data.
• Redo log files – these contain a chronological record of changes made
to the database, and enable recovery when failures occur.
• Control files – these are used to synchronize all database activities
and are covered in more detail in a later module.
Other key files
• Parameter file – there are two types of parameter files. 
• The init.ora file (also called the PFILE) is a static parameter file.  It contains parameters
that specify how the database instance is to start up.  For example, some parameters
will specify how to allocate memory to the various parts of the system global area.
• The spfile.ora is a dynamic parameter file.  It also stores parameters to specify how to
startup a database; however, its parameters can be modified while the database is
running.
• Password file – specifies which *special* users are authenticated to
startup/shut down an Oracle Instance.
• Archived redo log files – these are copies of the redo log files and are
necessary for recovery in an online, transaction-processing environment in
the event of a disk failure.
System Global Area
• The SGA is a read/write memory area that stores information shared
by all database processes and by all users of the database (sometimes
it is called the Shared Global Area). 
• o   This information includes both organizational data and control
information used by the Oracle Server. 
Program Global Area (PGA)

• A PGA is:
• ·        a nonshared memory region that contains data and control
information exclusively for use by an Oracle process.
• ·        A PGA is created by Oracle Database when an Oracle process is
started.
• Private SQL Area:  Stores information for a parsed SQL statement –
stores bind variable values and runtime memory allocations.  
• Session Memory:  Memory that holds session variables and other
session information.
• SQL Work Areas:  Memory allocated for sort and joins.
Shared Pool includes several cache areas
• Library Cache
• Memory is allocated to the Library Cache whenever an SQL statement is parsed
or a program unit is called.  This enables storage of the most recently used SQL
and PL/SQL statements.
• Data Dictionary Cache
• The Data Dictionary Cache is a memory structure that caches data dictionary
information that has been recently used. 
• This cache is necessary because the data dictionary is accessed so often.
• Information accessed includes user account information, datafile names, table
descriptions, user privileges, and other information.
• Server Result Cache
• The Server Result Cache holds result sets and not data blocks. The server
result cache contains the SQL query result cache and PL/SQL function result
cache, which share the same infrastructure.
• SQL Query Result Cache
• This cache stores the results of queries and query fragments. 
• Using the cache results for future queries tends to improve performance. 
• For example, suppose an application runs the same SELECT statement
repeatedly. If the results are cached, then the database returns them
immediately.
Buffer Caches
• Database Buffer Cache
• The Database Buffer Cache is a fairly large memory object that stores
the actual data blocks that are retrieved from datafiles by system
queries and other data manipulation language commands.
• Redo log Buffer Cache or Recovery Mechanism:
• - It's maintains records of modification database blocks
• - Primary purpose is recovery
Processes

• You need to understand three different types of Processes:


• ·        User Process:  Starts when a database user requests to connect
to an Oracle Server.
• ·        Server Process:  Establishes the Connection to an Oracle
Instance when a User Process requests connection – makes the
connection for the User Process.
• ·        Background Processes:  These start when an Oracle Instance is
started up.
Background Processes
• Started whenever an Oracle Instance starts up.

• PMON
• The Process Monitor (PMON) monitors other background processes. 
• It is a cleanup type of process that cleans up after failed processes.
• Examples include the dropping of a user connection due to a network
failure or the abnormal termination (ABEND) of a user application program. 
• It cleans up the database buffer cache and releases resources that were
used by a failed user process.
• SMON
• The System Monitor (SMON) does system-level cleanup duties. 
• It is responsible for instance recovery by applying entries in the online
redo log files to the datafiles. Other processes can call SMON when it
is needed.
• Opens the database to allow system users to logon.
• Rolls back uncommitted transactions.
• CHKPT:
•    - Updating the control file with checkpoint information.
• Name and explain the Oracle database shutdown modes.
• Name and explain three basic methods of backup and recovery.

You might also like