Sunday, April 27, 2008

System Global Area

The SGA consists of several memory structures:
1. Shared Pool
2. Database Buffer Cache
3. Redo Log Buffer
4. Other structures (for example, lock and latch management, statistical data)


Shared Pool
It consists of two key performance-related memory structures, Library Cache, Data Dictionary Cache. Because the Shared Pool can be shared globally, such as reusable SQL execution plans, PL/SQL packages, procedures, functions, and cursor information, it must be sized to accommodate the needs of both the fixed and variables areas. Memory allocation for the Shared Pool is determined by the SHARED_POOL_SIZE initialization parameter. It can be dynamically resized using ALTER SYSTEM SET. After performance analysis, this can be adjusted but the total SGA size cannot exceed SGA_MAX_SIZE.

Libray Cache
It stores information about eh most recently used SQL and PL/SQL statements. It enables the sharing of commonly used statements which is managed by the least recently used (LRU) algorithm.

Data Dictionary Cache
This is a collection of the most recently used definitions in the database, which includes information about database files, tables, indexes, columns, users, privileges, and other database objects. During the parse phase, the server process looks at the data dictionary for information to resolve object names and validate access. By caching data dctionary information into memory improves response time on queries and DML.

There are two additional memory structures that can be configured within the SGA:
1. Large Pool
2. Java Pool

Wednesday, April 23, 2008

Oracle Architecture Diagram


 
Posted by Picasa

Oracle Primary Components

Oracle server:
There are several files, processes and memory structures in an Oracle server, however, not all of them are used when processing a SQL statement. Some are used to improve the performance of the databse, to ensure that the database can be recovered in the event of a software of hardware error, ot to perform other tasks necessary to maintain the database. The Oracle server consists of an Oracle instance and an Oracle database

Oracle Instance:
An Oracle instance is the combination of the background processes and memory structures. The instance must be started to access the data in the database. Every time an instance is started, a System Global Area (SGA) is allocated and Oracle background processes are started. Background processes perform functions on behalf of the invoking procceses. They consolidate functions that would otherwise be handled my multiple Oracle programs running for each user. The background processes perform input/output (I/O) and monitor other ORacle processes to provide increased parallelism for better performance and reliability. An Oracle instance consists of the System Global Area (SGA) memory structure and the background processes that are used to manage a database. An instance is identified by using methods specific to each operating system. The instance can open and use only one database at a time.

Oracle Database:
The general purpose of a database is to store and retrieve related information. an Oracle database has a logical and a physical structure. The physical structure of the database is a set of operating system files in the database. An Oracle database consists of three file types.
1. Data files containing the actual data in the database.
2. Online redo log files containing a record of changes made to the database to enable recovery of the data in case of failures.
3. Control files containing information necessary to maintain and verify database integrity.

Memory Structure
Oracle's memory structure consists of two memory areas known as
1. System Global Area (SGA): Allocated at instance startup, and is a fundamental component of an Oracle instance.
2. Program Global Area (PGA): Allocated when the server process is started.