General Overview of Oracle Database
General Overview of Oracle Database
SGA
Shared pool
Library
Database cache
Redo log
buffer
buffer
cache Data dictionary
cache
Server
DBWn CKPT LGWR ARCn
process
User Archived
process Control Online redo log files
Data files files log files
Database
• System Global Area (SGA): Group of shared memory
structures, known as SGA
components, that contain data and control information for
one Oracle Database instance.
The files that constitute an Oracle database are organized into the
following:
Control files: Contain data about the database itself (that is, physical database
structure information). These files are critical to the database. Without them, you
cannot open data files to access the data in the database.
Data files: Contain the user or application data of the database, as well as metadata
and the data dictionary
Online redo log files: Allow for instance recovery of the database. If the database
server crashes and does not lose any data files, the instance can recover the database
with the information in these files.
Parameter file: Is used to define how the instance is configured when it
starts up
Archived redo log files: Contain an ongoing history of the data changes
(redo) that are generated by the instance. Using these files and a backup of
the database, you can recover a lost data file. That is, archive logs enable the
recovery of restored data files.
Logical and Physical Database Structures
Logical Physical
Database
Segment
Extent
Oracle data
OS block
block
Tablespaces and Data Files
• Tablespaces consist of one or more data files.
• Data files belong to only one tablespace.
USERS tablespace
Tablespaces and Data Files
• The Oracle database stores data logically in
tablespaces and physically in data files.
• Tablespaces:
• Can belong to only one database
• Consist of one or more data files
• Are further divided into logical units of storage
• Data files:
• Can belong to only one Database
tablespace and one database Tablespace
• Are a repository for schema
object data
Data files
Starting Up an Oracle Database Instance:
OPEN
OPEN
STARTUP All files opened as
described by the control
MOUNT file for this instance
Control file
opened for this
NOMOUNT instance
Instance
started
SHUTDOWN
Startup Options: Examples
SQL> startup 1
Shutdown modes:
• A = ABORT
• I = IMMEDIATE
• T = TRANSACTIONAL
• N = NORMAL
Using SQL*Plus
to Start Up and Shut Down
[oracle@EDRSR9P1 oracle]$ sqlplus dba1/oracle as sysdba
Operating system
What is RAC?
• Multiple instances running on separate servers (nodes)
• Single database on shared storage accessible to all nodes
• Instances exchange information over an interconnect network
Interconnect
Instance 1 Instance 2
Node 1 Node 2
Shared
Storage
19
• OCR (Oracle Cluster Registry) – resides on shared storage and maintains
information about cluster configuration and information about cluster
database. OCR contains information like which database instances run on
which nodes and which services runs on which database.
• Voting Disk – is file that resides on shared storage and Manages cluster
members. Voting disk reassigns cluster ownership between the nodes in
case of failure.
• Diskgroup –
• VIP -virtual IP
• Interconnect - Instances communicate with each other over the
interconnect (network)
• SCAN Ips
• SCAN – Single Client Access Name
Cluster commands
• Crsctl stat res –t
• Crsctl start/stop cluster
ASM commands
• Asmcmd lsdg
• Asmcmd mount all
• Asmcmd umount all
RMAN backups
Using the RMAN Command Line
1 $ rman target /
2 RMAN> CONFIGURE …
3 RMAN> BACKUP DATABASE PLUS ARCHIVELOG;
Copies of
Control
Control Archived log
Data files files file SPFILE
file