0% found this document useful (0 votes)
14 views

Oracle DBA Training

Uploaded by

Anand Rohit
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Oracle DBA Training

Uploaded by

Anand Rohit
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 28

Oracle DBA Training

By
P.S.Rani
Relational Database Management System

 RDBMS is based on(RDBMS)


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 Atomicity which means transactions


are either completely full or no effect at all
 RDBMS provides concurrency which means multiple
users accessing the same group of resources (such as
tables, rows)
RDBMS & SQL
 Database Market Share is 48 % 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.
DBA Tasks
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
 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
Oracle 11g New Features

RMAN Enhancements in 11g.

Duplicating a Database.

Creating a Standby Database with the DUPLICATE Command.

Parallel Backup and Restore for Very Large Files.

IMPORT CATALOG RMAN Command.

RMAN Data Recovery Commands.

RMAN Security Enhancements.

Improved Integration of RMAN and Data Guard.


Oracle Database Architecture
Oracle Architecture contd…
Significant Terms to be known
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.
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.

• BGP Examples : PMON, SMON, DBWR, LOGWR


etc..
Oracle Instance and Database

Oracle Instance constitutes :

 Background Processes and

 Memory Structures

Oracle Database constitutes :

 Data files
 Redo log files
 Control files
 Archive log files
 Parameter files
Oracle Instance Architecture
Oracle Process Architecture
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
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
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


BGP
SYSTEM MONITOR ( SMON )

Used for Instance Recovery (System/Media Failure )

Roll forward committed transactions (changes in redolog files)

Open Database for access

Rollback uncommitted transactions

Coalesces free spaces

Deallocates Temporary Segments

PROCESS MONITOR (PMON )

Cleans the failed process

Rolls back user’s current transactions

Releasing locks

Releasing other resources

Restoring dead dispatchers


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 Groups:
Active – written over, ready to move to archive
Inactive – ready to overwrite , information passed
to archive
Current – currently writing
Unused - Freshly created group
BGP
Members Status
1. Stale – Half-written and switched log
2. Blank - Currently Writing
3. delete - dropped members
4. invalid – corrupted, inaccessible
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
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
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
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
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
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

You might also like