Search notes:

Oracle System Global Area (SGA)

The SGA is the (shared) memory that an Oracle instance needs to operate.

Components of the SGA

The components of the SGA are
The sizes of these components can be queried from v$sga.

Variable SGA

The variable SGA consists of

Shared pool vs buffer cache

A notable distinction between the Shared Pool and the buffer cache is that the shared pool primarily caches metadata while the buffer cache stores data.

SGA Granules

In 9i, the SGA architecture was reengineered with a concepts called granules which are uniformely sized memory units that can be allocated, freed or relocated between memory areas such as buffer cache and shared pool depending on the workload.
The size of the granules are dependent on OS, Oracle version and size of the SGA (MOS ID #947152.1).
It can be determined with
select bytes/1024/1024 gran_sz_mb from v$sgainfo where name = 'Granule Size';
See also x$ksmge

Queries

select
   component,
   current_size/power(1024,2) size_mb,
   last_oper_type,
   last_oper_time,
   granule_size
from
   v$memory_dynamic_components
order by
   component;

See also

v$sga can be queried for the actual memory consumption of the SGA.
v$sga_dynamic_components, v$sga_dynamic_free_memory
Memory (Oracle) and memory management.
oradebug dumpvar sga …
In order to run APEX, the SGA must be at least 300 MB.
init parameters:
x$ksmmem allows to read the value of every byte in the SGA.
The names of of SGA variables are listed in x$ksmfsv.
oradebug dump global_area 2

Links

Kyle Hailey has written a C program to directly access the SGA.

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759448620, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/architecture/instance/SGA/index(137): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78