11g自动内存设置(一)

2014-11-24 16:14:06 · 作者: · 浏览: 5
11g自动内存设置
The simplest way to manage instance memory is to allow the Oracle Database instance to automatically manage and tune it for you.
一种简单管理内存的方式是:让oracle自动为你管理和调优!
To do so (on most platforms), you set only a target memory size initialization parameter (MEMORY_TARGET) and optionally a maximum memory size initialization parameter (MEMORY_MAX_TARGET).
多数平台上,你只需设置初始化参数MEMORY_TARGET,再随意(大于后者等于MEMORY_TARGET)设置初始化参数MEMORY_MAX_TARGET
The total memory that the instance uses remains relatively constant, based on the value of MEMORY_TARGET, and the instance automatically distributes memory between the system global area (SGA) and the instance program global area (instance PGA). As memory requirements change, the instance dynamically redistributes memory between the SGA and instance PGA.
实例的总内存以MEMORY_TARGET设置的值为准(开机时oracle以MEMORY_TARGET参数值为准给instance分配内存!如果业务需要分配更大内存,oracle将自动扩展,但不能超过MEMORY_MAX_TARGET的值),实例根据需要自动分配内存给SGA和PGA
When automatic memory management is not enabled, you must size both the SGA and instance PGA manually.
当自动内存管理未启用时,你必须指定SGA和PGA的内存大小
Because the MEMORY_TARGET initialization parameter is dynamic, you can change MEMORY_TARGET at any time without restarting the database.
MEMORY_TARGET 是一个动态参数,可以再任何需要的时候进行调整而不必重启实例!
MEMORY_MAX_TARGET, which is not dynamic, serves as an upper limit so that you cannot accidentally set MEMORY_TARGET too high, and so that enough memory is set aside for the database instance in case you do want to increase total instance memory in the future. Because certain SGA components either cannot easily shrink or must remain at a minimum size, the instance also prevents you from setting MEMORY_TARGET too low.
MEMORY_MAX_TARGET是一个静态参数,作为一个上限值(限制MEMORY_TARGET参数),你不能将MEMORY_TARGET设置的过高,并且要保留足够的内存来满足在以后实例的扩张。但是实例总是不允许你将MEMORY_TARGET参数设置的过低,因为SGA的组件大小有最小值限定,还有些组件是很难缩小的!
If you create your database with Database Configuration Assistant (DBCA) and choose the basic installation option, automatic memory management is enabled. If you choose advanced installation, Database Configuration Assistant (DBCA) enables you to select automatic memory management.
如果你用DBCA创建 数据库并且选择基本安装选项,自动内存默认是启用的!假如你是高级安装你也可以选择启用自动内存管理!
开启自动内存管理的步骤:
1:Start SQL*Plus and connect to the database as SYSDBA.
以sys用户登录
2:Calculate the minimum value for MEMORY_TARGET as follows:
计算MEMORY_TARGET 的最小值!
a:Determine the current sizes of SGA_TARGET and PGA_AGGREGATE_TARGET by entering the following SQL*Plus command:
确定SGA_TARGET ,PGA_AGGREGATE_TARGET 参数的大小:
show parameter target
NAME TYPE VALUE
------------------------------ ----------- ----------------
archive_lag_target integer 0
db_flashback_retention_target integer 1440
fast_start_io_target integer 0
fast_start_mttr_target integer 0
memory_max_target big integer 0
memory_target big integer 0
pga_aggregate_target big integer 90M
sga_target big integer 272M
b:Run the following query to determine the maximum instance PGA allocated since the database was started:Run the following query to determine the maximum instance PGA allocated since the database was started:
确定从数据库启动以来实例分配给PGAde 的最大值:
select v