Database Architecture
Database Architecture
Physical Structure
Logical Structure
SGA / PGA
Background Processes
Backup Methods
Administrative Tasks
Overview of Primary Components
Instance
User
process Shared Pool SGA
Segments
Above extents, the level of logical database storage is a segment. A segment is a
set of extents allocated for a certain logical structure. The different types of
segments are :
Data segment – stores table data
Index segment – stores index data
Temporary segment – temporary space used during SQL execution
Rollback Segment – stores undo information
Logical Structures (cont’d)
Schema Overview
A schema is a collection of database objects. A schema is owned by a database
user and has the same name as that user. Schema objects are the logical
structures that directly refer to the database's data. Schema objects include
structures like tables, views, and indexes.
Oracle Instance
The basic difference between SGA and PGA is that PGA cannot be shared
between multiple processes in the sense that it is used only for
requirements of a particular process whereas the SGA is used for the whole
instance and it is shared.
Oracle Background Processes
An Oracle database uses memory structures and processes to manage and access the
database. All memory structures exist in the main memory of the computers that
constitute the database system. Processes are jobs that work in the memory of these
computers.
Oracle creates a set of background processes for each instance. The background
processes consolidate functions that would otherwise be handled by multiple Oracle
programs running for each user process. They asynchronously perform I/O and
monitor other Oracle processes to provide increased parallelism for better
performance and reliability.
Archiver - ARCH
The Archiver process reads the redo log files once Oracle has filled them and
writes a copy of the used redo log files to the specified archive log destination(s).
Actually, for most databases, ARCH has no effect on the overall system
performance. On some large database sites, however, archiving can have an
impact on system performance.
Background Processes (cont’d)
Checkpoint - CKPT
All modified information in database buffer in the SGA is written to the datafiles
by a database write process (DBWR). This event indicates a checkpoint. The
checkpoint process is responsible for signaling DBWR at checkpoints and
updating all of the datafiles and control files of the database.
Recover - RECO
The recover process automatically cleans up failed or suspended distributed
transactions.
Server Information
Sun e4500
8GB Ram
8 x 400mhz CPU
32GB Disk for
Oracle
4mm DAT DDS3
Tape Backup
Computer Science Database
Instance Name : CS01 (v$database)
Instance Version : 8.1.6.0.0
Tablespaces : (dba_tablespaces)
SYSTEM – holds all system tables
INDEX01 – user indexes
USERS01 – user tables
USERS02 – user tables (faculty)
RBS – rollback segments
Backup Methods
Cold Backup (aka Consistent Backups)
The only way to make a consistent whole database
backup is to shut down the database with the
NORMAL, IMMEDIATE, or TRANSACTIONAL options
and make the backup while the database is closed.
Advantage : No recovery is required after datafiles
are restored – quicker restore
Disadvantage : No access to database during backup
time (depends on size/system speed)
Backup Methods (cont’d)
Hot Backup (aka Inconsistent Backups)
If the database must be up and running 24 hours a
day, seven days a week, then you have no choice but
to perform inconsistent backups of the whole
database. A backup of online datafiles is called an
online backup. This requires that you run your
database in ARCHIVELOG mode.
Advantage : Database remains open during backup
Disadvantage : Large databases may have
performance impact during backup, recovery takes
longer and is slightly more complex
Backup Methods (cont’d)
Logical backup (Export)
Logical backups are exports of schema objects, like
tables and stored procedures, into a binary file.
Oracle utilities are used to move Oracle schema
objects in and out of Oracle.
Not recommended for backup of a whole database,
but useful for backing up individual objects or
schemas or moving data into another database
Administrative Tasks
Daily Checks
Check database availability
Check logs / trace files
Check free space / resources
Check for invalid objects
Check for broken jobs
Verify backup
Administrative Tasks (cont’d)
Weekly Tasks
Collect statistics (database job)
Archive / delete log files
Run performance reports (statspack)
Administrative Tasks (cont’d)
Others
Applying patches
Database upgrades
New Database installations
Creating user accounts
More Information
Oracle 10g Release 2 Database Documentation
http://www.oracle.com/pls/db102/
This Document
Computer Science Homepage -> On-Line help