Oracle 内存

Basic Memory Structures

Oracle Database Memory Structures

System global area (SGA)

Program global area (PGA)

One PGA exists for each server process and background process.

User global area (UGA)

The UGA is memory associated with a user session.

Automatic Memory Management

Enabling Automatic Memory Management

SGA_TARGET

1
2
3
4
5
SELECT (
(SELECT SUM(value) FROM V$SGA) -
(SELECT CURRENT_SIZE FROM V$SGA_DYNAMIC_FREE_MEMORY)
) "SGA_TARGET"
FROM DUAL;

MEMORY_TARGET

show parameter memory_max_target
show parameter memory_target

– 修改自动内存管理参数
alter system set memory_max_target=600M scope=spfile;
alter system set memory_target=600M scope=spfile;

show parameters shared_pool_size;

– 指定 shared_pool_size 大小
alter system set shared_pool_size=’60m’ scope=spfile;