Você está na página 1de 5

DATAFILE it can be associated with one and only one database.

all the schema objects like table ,indexes,sequences,synonyms,rollback segment s lie in the datafile ROLL BACK SEGMENT:- they are create by dba. changes in rollback segment are reco rded in redolog buffer. server process saves old value in a rollback segment before making any change. this before image is used for the following porpose 1)undo changes if the transection is rolled back. 2)provide consistacy by ensuring that other transection do not uncommited changes. 3)recover database to consistant state in the case failure.

logical unit of storage is called tablespace. redolog contain record of changes made to the database. to enable recovery.a database require atleast two redologfiles. controlfile is used to identify datafile and redologfiles. a parameter file contains characteristics of an oracle instance. for example it has a parameter for the size of some of the memory structures in SGA. Password file authenticates which users are permitted to startup and shutdown oracle instance. Archived redo log files are the offline copies of the redo log files that are ne cessary for the recovery of data from media failure. Oracle instance is a means to access oracle database. It opens one and only one database.SGA is a memory area that is used to store database information tha t is shared by database process SGA consists of several memory structures 1.shared pool:- stores most recently used SQL statements and most recently used data from the datadictionary. sharedpool coponents *liibrary cache it contains SQL statement text,parsed code, and execution plan *The data dictionary it contains table,column and other object definitions and previllages. * The shared pool is sized by the SHARED_POOL_SIZE

2.database buffer cache:- stores most recently used data, which read from and wr itten to the datafile. ITS SIZE IS BASED on DB_BLOCK_SIZE NUMBAER OF BUFFERS DEFINED BY DB_BLOCK_BUFFERS 3.redo log buffer :- is used to track changes made to the database by server pro cess and background process. its characteristics are as follows -its size can be defined by LOG_BUFFER parameter -it records the block that is changed,the locationof the ch ange and new value in the redo log entry -redo log buffer is used sequentialy i.e. changes made by o ne trasection can be interleaved by the changes made by other transectio n. -it is a circular buffer so it can be used again once its f ull but only after redo entries are noted in redo log files. 4.java pool:- used to store java code. 5.large pool:- is used to store large memory structure not related in SQL proces sing. USER PROCESSES:BACKFROUND PROCESS IT performs input output and monitor other oracle processes required to provid e increased parallalism for better performance and reliablity. five required background processes for instance are 1.-> database writer (DBWO) It writes changed data from database buffer cache to datafiles. it writes in the following cases *when there are many dirty buffers *there are few free buffers *time out occurs *checkpoint occurs 2.-> log writer(lgwr) It writes the changes registered to redolog buffer from to redo log files. log writer writes when *there is a commit *the redo log buffer is one third full *there is more then 1 MB of redo *before DBWO writes

3:->system monitor(SMON) It checks for the consistancy of database and starts it 's recovery when database is opened. *automatically recovers the instance -rolls forward changes into redo log -opens database for user accesss -rollsback uncommited transactions *coallases free blocks *deallocates temporrory segments 4:->process monitor(PMON) Cleans up the resources if any of the processes fails. *rolling back the transections *releasing locks *releasing resources 5:->check point process(CKPT) Is resposible for updating database status in the control files and datafiles. connect to an instance using user process and server process user processes and server processes arn't a part of oracle instance but are requ ired to process sql statements. queries require additional process reqired to return rows to the user. DML statements require additional processes to log changes made to the database. commit processing ensures that the changes made in the trasection can can be recoverd. An opitonal database process ARCO is used to ensure that the production database can be recovered. SERVER PROCESS:PGA:it is a memory region that contains data and control information for the serv er process. not sharable writable only by the server processes contains - sort area :- used for sort that may be required for processing SQL statemen t - session information:-user previllages and performance statistics for the ss ession -cursor state:-stage in the processing of sql statement -stack space:-contains other ssession variables. PGA is allocted when a process is created and deallocated when the process is terminated.

CONNECTION:connection is a communication pathway between user process and oracle server. three ways to connect database to oracle server 1) user logs on to the operating system running oracle instance and an applicati on or oracle tool that access the database on that system. 2)user starts application or a tool on localcomputer and connects over a network to the computer which runs oracle instace. 3)in a threetired communication system users computer communicate over the network to an application or an application server which is connected to a network running oracle instance. SSESSION session is a specific connection of a user to the server.for a single user there can be many sessionsfor same database. STARTING A SESSION needs an oracle server to be availabe for use.

PROCESING A QUERY 1)PARSE:searech for an idetical statement. check syntex,object name and privilages locks object during parse create lock execution plan 2)EXECUTE:idetify rows selected. 3)FETCH:return rows to user process. PROCEESING A DML STATEMENTS 1)PARSE:-same as pase phase used for processing a sql query. 2)EXECUTE:-requires addtion changes to make database changes. .if the data and the rollback blocks are not in the buffer cache ths servser process reads them in the the buffer cache from the database file. .the server process place lock on the rows to be modified. .the server process records the changes made to the data in the redolog buffe r. .the rollback block is used to store before image of the data. .the data blocks records the new values of the data.

COMMIT PROCESSING The oracle server uses a fast commit mechanism to guarentee thet commited changes can be recovered in case of instance failure. when a transection commits (SCN) to the transection.it database.SCN enables oracle ng on the date and time of the the system assigns a commit system change number is monotonicaly increamented and is unique to the server to perform consistancy checks without dependi operating system. performed the scn in the redo log buffer. entries in the redo log files. the changes will not be lost eve

When a COMMIT is issued the following steps are .the server process places a commit record with .LGWR performs write of all the redo log buffer after these an oracle server guarantees that n if at the instance failuare. .user is informed that the commit is complete.

.server processes records the information that indicates that the transection is complete and resource lock can be rleased.

Você também pode gostar