2. Relational Database Management System
(RDBMS)
RDBMS is based on the relational model. Data and
relations are stored in the form of tables. Tables are
accessed via Primary Keys, Foreign Keys and Indexes.
RDBMS provides consistency which means transactions
are either completed fully or no effect at all
RDBMS provides concurrency which means multiple
users accessing the same group of resources (such as
tables, rows)
3. RDBMS & SQL
Database Market Share is 40 % dominated by
Oracle whereas IBM occupies 31%, Microsoft
12% and remaining by others.
User interface with RDBMS in SQL – a standard
interactive and programming language for
querying and modifying data and managing
databases.
4. Installing and upgrading Database software and
application tools
Allocating system storage and planning future
allocation
Creating Database and its storage parameters .
Creating Database structures , objects, users and
granting privileges
DBA Tasks
5. DBA Tasks
Set up Database security and auditing
Set up Database Backup and Recovery when
required
Set up Database Monitoring
Database Optimization and Performance Tuning
Maintaining Database and implementing High
Availability
10. What is an Oracle Instance ?
An Oracle instance is a means to access the Oracle Database
Always opens one and only one database
What is SGA ?
SGA is System Global Area . It constitutes DBBC ( Database
Buffer Cache ), RBC(Redolog Buffer Cache) , Shared Pool and
Shared Server.
What is server process ?
Services a single user process in the dedicated server and
multiple user processes in a shared server.
What is user process?
Runs on a client machine using tools like SQL Plus , OEM etc.
Significant Terms to be known
11. What is an Instance ?
• An Instance is made up of background
processes and memory structures .
• An instance controls zero or more databases.
• A database can have one or more instances.
• Examples : PMON, SMON, DBWR, LOGWR
etc..
16. Background Processes
Performs functions on behalf of user process
Input, Output and Monitor other Oracle Processes
to provide improved parallelism for better
performance and reliability
17. Background Processes
DBWR:
When it writes into datafiles :
When dirty buffer of the whole block reaches
threshold limit
When Checkpoint occurs
When there are no free buffers
Time out Occurs
Tablespace is taken offline /read only/begin
backup
Drop/truncate a table
18. BGP
Log Writer:
Performs sequential writes from Redolog Buffer
When LGWR writes:
Commit
When 1/3 of memory is full
Every 3 seconds
When it reaches 1 MB
Before DBWR writes
Calls on DBWR to write into data files
Used for Recovery purposes
19. BGP
SYSTEM MONITOR ( SMON )
Used for Instance Recovery (System/Media Failure )
Rollforward committed transactions (changes in redolog files)
Open Database for access
Rollback uncommitted transactions
Coalesces free spaces
Deallocates Temporary Segmen
PROCESS MONITOR (PMON )
Cleans the failed process
Rolls back user’s current transactions
Releasing locks
Releasing other resources
Restoring dead dispatchers
20. BGP
CheckPoint:
Checkpoint is an event that occurs whenever the
log switches
Signals the DBWR to flush the data from DBBC to DF
Updates SCN and LSN
Stages of Redolog:
Active – written over, ready to move to archive
Inactive – ready to overwrite , information passed to
archive
Current – currently writing
Unused - Freshly created group
21. BGP
Members Status
1. Stale – Half-written and switched log
2. Blank - Currently Writing
3. delete - dropped members
4. invalid – corrupted, inaccessible
22. System Global Area (SGA)
SGA is dynamic
Allocated and tracked in granules by SGA
Components
Contiguous Virtual Memory Allocation
A Granule is the unit of contiguous Memory
Allocation
DBBC and Shared Pool grow and Shrink
23. sga
SGA_MAX_SIZE
v$buffer_pool
Fixed SGA – Shared Pool, DBBC ,RLBC
Dynamic SGA – Changes made while DB is up
DB_CACHE_SIZE
LOG_BUFFER
SHARED_POOL_SIZE
LARGE_POOL_SIZE
JAVA_POOL_SIZE
24. Shared Pool
This is used for objects shared globally such as
reusable execution plans, pl/sql packages,
procedures, functions, cursor information etc.,
LRU Algorithm : As the Cache fills, less recently
used execution plans and parse trees are removed
from LC to make room for the new entries
Shared Pool Contains : Library Cache and Data
Dictionary Cache
25. Library Cache
Stores information about the shared sql and pl/sql
statements
Enables the sharing of commonly used statements
LRU Algorithm
SharedSQL
Shared PL/SQL
Shared_pool_size
Memory is allocated when a statement is parsed or a
program unit is called
26. Shared SQL
Stores and Shares the execution plan and parse
trees for sql statements run against the database
If second time an sql statement is run, it can take
parse information already available is reused
The text,schema and bind variables must be
same to ensure that sql statements share the
shared SQL Area
Shared PL/SQL
Stores and shares the most recently used pl/sql
statements. Parsed and compiled programs with
units and Procedures are stored in this area
27. Data Dictionary Cache
Also called as Row Cache
Most recently used data definitions in the Database
Includes information about database files, users,
privileges, tables, indexes, column and other
database objects
To resolve object names and validate access the
server process looks at data dictionary Information
about user data,data file names,segment
names,extent location,table description