RelationalDBDesign RelationalDBDesign

Instance Architecture   «Prev  Next»
Lesson 5 The System Global Area (SGA)
Objective Identify purpose and major components of System Global Area.

System Global Area (SGA)

Function of the SGA

The System Global Area, or SGA, is a shared memory structure that is the focal point of activity for an Oracle instance. The SGA contains both data and control information for an instance, and is referenced in one way or another by virtually all of the background processes. Move your mouse over the image below to see the major components of the SGA.

Database Buffer Cache, Redo Log Buffer, Shared Pool
  1. (Database buffer cache): Holds data blocks that have been read from datafiles.
  2. (Redo Log Buffer): Holds redo log records prior to their being written to the log files.
  3. (Shared Pool): Contains parsed versions of SQL statements and other information.

Database Buffer Cache

Benefits of the SGA

Oracle uses this shared memory structure because it is a much more efficient way to share data between processes than other mechanisms.
The size of the SGA can be significant, easily reaching several hundred megabytes for a large database. The SGA has a significant impact on database performance, and it's important to understand the various components so that you can size them properly. The next module covers the SGA in detail.

The (SGA) System Global Area is a group of shared memory areas that are dedicated to an Oracle instance, which is an instance is your database programs and RAM.
All Oracle processes use the SGA to hold information and the SGA is used to store incoming data.
  1. the data buffers as defined by the db_cache_size parameter), and
  2. internal control information that is needed by the database.
You control the amount of memory to be allocated to the SGA by setting the Oracle initialization parameters. These may include
  1. db_cache_size,
  2. shared_pool_size and
  3. log_buffer.

In Oracle Database 10g you only need to define two parameters, namely
  1. sga_target and
  2. sga_max_size
to configure your SGA. If these parameters are configured, Oracle will calculate how much memory to allocate to the different areas of the SGA using a feature called (AMM) Automatic Memory Management . As you progress you may want to manually allocate memory to each individual area of the SGA using the initialization parameters.