Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
3Activity
0 of .
Results for:
No results containing your search query
P. 1
oracle architecture

oracle architecture

Ratings: (0)|Views: 41|Likes:
Published by vipin.s.tomar

More info:

Published by: vipin.s.tomar on Apr 14, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

06/11/2010

pdf

text

original

 
Oracle ArchitectureThere are two terms that are used with Oracle
Database
- A collection of physical operating system files
Instance
- A set of Oracle processes and a SGAThese two are very closely related but a database can be mounted and opened by many instances. An instancemay mount and open only a single database at any one point in time.
The File Structure
The are five types of files that make up a database
Parameter Files
- These files tells Oracle were to find the control files. Also they detail how big themeory area will be, etc
Data Files
- These hold the tables indexes and all other segments
Redo Log Files
- Our transaction logs
Control Files
- Details the location of data and log files and other relevant information about their state.
Temp Files
- used for disk-based sorting and temporary storage
Password Files
- Used to authenticate users logining into the database.
Parameter Files
The parameter file for Oracle is the commonly know file init.ora (or init<oracle sid>.ora). The file itself is avery simple plain text file (on oracle 9i is can also be a binary file) and details information regarding block size,location of the control files, etc. On a windows server the file can be found in[ORACLE_HOME]/admin/<sid>/pfile but can be in any location by using the "
 startup pfile = <location>
" .Sometimes a parameter may start with a underscore this normally refers to a undocumented parameter and isnormally only requested by Oracle support.
Data Files
 Normally there are at least two data files, one for 
System
data and the other for 
User 
data.
Segments - are database objects, a table, a index, rollback segments. Every object that consumes space isa segment. Segments themselves consist of one or more extents.
Extents - are a contiguous allocation of space in a file. Extents, in turn, consist of blocks
Blocks - are the smallest unit of space allocation in Oracle. Blocks normally are 2KB, 4KB or 8KB insize but can be larger.The relationship between segments, extents and blocks looks like this
 
Oracle ArchitectureEvery block within the Oracle database will be the same size and all block generally have the same format,which looks something like the below, note that the block size will normally be 2KB, 4KB or 8KB.Header contains information regarding the type of block (a table block, index block,etc), transaction information regarding active and past transactions on the block and the address (location) of the block on the disk TableDirectorycontains information about the tables that store rows in this block RowDirectorycontains information describing the rows that are to be found on the block. Thisis an array of pointers to where the rows are to be found in the data portion of the block.Block overheadThe three above pieces are know as the Block Overhead and are used by Oracleto manage the block itself.A tablespace is a container which holds segments. Each and every segment belongs to exactly
one
tablespace.Segments never cross tablespace boundaries. A tablespace itself has one or more files associated with it. Anextent will be contained entirely within one data file.So in summary the Oracle hierarchy is as follows:
A
database
is made up of one or more tablespaces
A
tablespace
is made up of one or more data files, a tablespace contains segments
 
Oracle Architecture
A
segment
(table, index, etc) is made up of one or more extents. A segment exists in a tablespace butmay have data in many data files within a tablespace.
An
extent
is a continuous set of blocks on a disk. An extent is in a single tablespace and is always in asingle file within that tablespace.
A
block 
is the smallest unit of allocation in the database. A block is the smallest unit of i/o used by thedatabase.
Temp Files
Oracle will use temorary files to store results of a large sort operation when there is insufficient memory to holdall of it in RAM. Temporary files never have redo generaed for them, although they have UNDO generated.Temporary data files never need to be backed up.
Control Files
The control files contain a directory of the other files Oracle needs. The control files tell the instance where thedatabase and online redo log files are. The control files also tell Oracle about checkpoints that have taken place,the name of the database, archive redo log history, etc. Control files should be duplicated across different disksas it make recovery much harder without them.
Redo Log Files
Redo log files are used for recover purposes only. There are two types of redo log files
online
and
archive
.There are at least 2 online redo log files and they are used in a circular fashion when one fills up oracle willswitch to the next log file.
Archive Redo log
When a redo log file fills up and before it is used again the file is archived for safe keeping, this archive filewith other redo log files can recover a database to any point in time. It is best practice to turn onARCHIVELOG mode.
The Memory Stucture
There are five memory stuctures that make up the System Global Area (SGA). The SGA will store manyinternal data structures that all processes need access to, cache data from disk, cache redo data before writing todisk, hold parsed SQL plans and so on.
SGA

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->