1. Oracle Database
- A database is a collection of data treated a unit.
- The purpose of a database is to store and retrieve related information.
- Oracle Database reliably manages a large amount of data in a multiuser environment so that many users can concurrently access the same data.
This is accomplished while delivering high performance.
- Oracle Database prevents unauthorized access and provides efficient solutions for failure recovery.
http://itsiti.com/wp-content/uploads/2010/12/Oracle Database Server Structure.jpg
2. Oracle Database Architecture
- An Oracle database server consists of an Oracle database and one or more database instances.
- The instance consists of memory structures and background processes.
- Every time an instance is started, a shared memory area called the System Global Area (SGA) is allocated and the background processes are started.
http://itsiti.com/wp-content/uploads/2010/12/Oracle Memory Database Structure.jpg
3. Program Global Areas (PGA)
- Memory regions that contain data and control information for a server or background process.
- A PGA is non-shared memory created by Oracle Database when a server or background process is started. Access to the PGA is exclusive to the server process.
- Each server process and background process has its own PGA.
4. System Global Area (SGA)
Group of shared memory structures, known as SGA components that contain data and control information for one Oracle Database instance.
The SGA is shared by all server and background processes. Examples of data stored in the SGA include cached data blocks and shared SQL areas.
1) Database buffer cache
- Caches blocks of data retrieved from the database
- Holds copies of data blocks that are read from data files
- Is shared by all concurrent users
- Is managed by a combination of LRU(Least Recently Used) lists and touch count
- Cache Hit & Cache Miss:The first time an Oracle DB user process requires a particular piece of data, it searches for the data in the database buffer cache.
If the process finds the data already in the cache (a cache hit), it can read the data directly from memory.
If the process cannot find the data in the cache (a cache miss), it must copy the data block from a data file on disk into a buffer in the cache before accessing the data.
Accessing data through a cache hit is faster than data access through a cache miss.
2) Redo log buffer
- Caches redo information (used for instance recovery) until it can be written to the physical redo log files stored on the disk
- Is a circular buffer in the SGA
- Holds information about changes made to the database
- Contains redo entries that have the information to redo changes made by operations such as DML&DDL
- The redo entries take up continuous, sequential space in the buffer.
- The LGWR background process writes the redo log buffer to the active redo log file (or group of files) on disk.
3) Shared pool
- Caches various constructs that can be shared among users
- Library cache
- Data dictionary cache
- Shared SQL area: It is located in the library cache. It contains the parse tree and execution plan for a given SQL statement.
When a new SQL statement is parsed, Oracle DB allocates memory from the shared pool to store in the shared SQL area.
The size of this memory depends on the complexity of the statement.
* Data dictionary
- It is a collection of database tables and views containing reference information about the database, its structures, and its users.
- Oracle DB accesses the data dictionary frequently during SQL statement parsing.
- It is stored in two special locations in memory: the data dictionary cache (also known as the row cache because it holds data as rows instead of buffers) and the library cache.
- All user processes share these two caches for access to data dictionary information.
4) Large pool
- Optional area that provides large memory allocations for certain large processes, such as Oracle backup and recovery operations, and I/O server processes
- Session memory for the shared server and the Oracle XA interface (used where transactions interact with multiple databases)
- For Parallel Query operations
- The large pool is not managed by a LRU list.
5) Java pool
- Used for all session-specific Java code and data in the Java Virtual Machine (JVM)
6) Streams pool
- The Streams pool is used exclusively by Oracle Streams.
- It stores buffered queue messages, and it provides memory for Oracle Streams capture processes and apply processes.
Oracle Database 11g: Administration Workshop I Chapter 1