You are on page 1of 23

TADM51 - Database Administration

Oracle
DATABASE OVERVIEW

● Database architecture.

● Database administration tools


Database architecture
Oracle Server:
Oracle server is a RDBMS, consist of an Oracle
database and an Oracle Instance.

Oracle Database:
It is a collection of data logical treated as a unit and
physically stored in one or more data files on disks.
Database architecture
Oracle Instance:
It is an set of background process and memory
structures.
SGA
● The SGA is a shared memory region that
Oracle uses to store data and control
information for one Oracle instance.
● The SGA is allocated when the Oracle instance
starts and deallocated when the Oracle
instance shuts down.
● Each Oracle instance that starts has its own
SGA.
SGA
SGA Consists of the following

● The database buffer cache


● The redo log buffer.
● The library cache
SGA
Database Buffer Cache
● This stores the most recently used data blocks.
● These blocks can contain modified data that
has not yet been written to disk.
● Because the buffer cache the most active
buffers stay in memory to reduce I/O and
improve performance.
Redo log buffer
● This stores the changes made to the database.
SGA
Shared Pool
The shared pool consists of the library
cache and the data-dictionary cache.
Library Cache
● This is used to store the most recently used
SQL commands
The Data-Dictionary Cache
● The data dictionary contains a set of tables
and views that Oracle uses as a reference to
the database.
Background Processes

Few Important Oracle BG Process


● PMON

● SMON

● DBWR

● LGWR

● CKPT
PMON

PMON is responsible for cleaning up the


failed process by
● Rolling back the transaction
● Releasing the locks
● Restarts the dead dispatcher
DBWR

DBWR is responsible for writing dirty


data blocks from the database block buffers to
disk.

● It writes when it reaches the checkpoint


● When timeout occurs
● Dirty buffer reaches the threshold limit
LGWR

The LGWR process is responsible for


writing data from the log buffer to the redo log.
● At commit
● When redo log buffer cache is one third full
● For every 3 Secs
SMON

● Performs recovery at instance startup, if


necessary.
● Rolls back the uncommitted transacions.
● Cleans up temporary segments that are no
longer in use
ARCH

ARCH is responsible for copying the online


redo log files to archival storage when they
become full.
ARCH is active only when the RDBMS is
operated in ARCHIVELOG mode.
When a system is not operated in
ARCHIVELOG mode, it might not be possible to
recover after a system failure.
Database Administration Tools

You can connect to the DB using


Oracle tool SQL*Plus
● Connect to a database
● Start & Stop the DB
● Perform database administration
BR*Tools – Admistration tool
● It is installed at the directory /usr/sap/<SID>/SYS/exe/run.
BRTOOLS
Start & Stop DB
Modes of Shutdown of DB

● Normal
● Transactional
● Immediate
● Abort
Modes of shutdown

Normal
● No new connections are allowed
● Oracle waits for all currently connected users to
disconnect from the database.
● Only after the last user has disconnected (in
SAP system: all work processes have been
stopped), Oracle shuts down the database
Modes of shutdown
Transactional
● No new connections are allowed, and no new
transactions are allowed to be started after the
statement is issued
● Oracle waits for all open transactions to finish,
then it disconnects all users (work processes in
SAP system) and shuts down the database.
Modes of shutdown
Immediate
● No new connections are allowed, and no new transactions are
allowed to be started after the statement is issued.
Abort
● No new connections are allowed, and no new transactions are
allowed to be started after the statement is issued.
● All client SQL statements currently being processed are
terminated, without rolling back open transactions.Users are
disconnected and Oracle processes are stopped.
THANK YOU!!

You might also like