Oracle 11gR2 联机文档中关于内存管理的新特性
2012-01-18 16:42
351 查看
Oracle 11gR2 联机文档中关于内存管理的新特性
If you did not enable automatic memory management upon database creation (either by selecting the proper options in DBCA or by setting the appropriate initialization parameters for the
To enable automatic memory management
Start SQL*Plus and connect to the database as
Calculate the minimum value for
Determine the current sizes of
SQL*Plus displays the values of all initialization parameters with the string
Compute the maximum value between the query result from step 2b and
For example, if
This can be the minimum value that you computed in step 2, or you can choose to use a larger value if you have enough physical memory available.
For the
Do one of the following:
If you started your Oracle Database instance with a server parameter file, which is the default if you created the database with the Database Configuration Assistant (DBCA), enter the following command:
where n is the value that you computed in Step 4.
The
If you started your instance with a text initialization parameter file, manually edit the file so that it contains the following statements:
where n is the value that you determined in Step 4, and m is the value that you determined in step 3.
Note:
In a text initialization parameter file, if you omit the line for
Shut down and restart the database.
If you started your Oracle Database instance with a server parameter file, enter the following commands:
where n is the value that you determined in step 3.
Note:
The preceding steps instruct you to set
See Also:
If you did not enable automatic memory management upon database creation (either by selecting the proper options in DBCA or by setting the appropriate initialization parameters for the
CREATE DATABASESQL statement), you can enable it at a later time. Enabling automatic memory management involves a shutdown and restart of the database.
To enable automatic memory management
Start SQL*Plus and connect to the database as
SYSDBA.
Calculate the minimum value for
MEMORY_TARGETas follows:
Determine the current sizes of
SGA_TARGETand
PGA_AGGREGATE_TARGETby entering the following SQL*Plus command:
SHOW PARAMETER TARGET
SQL*Plus displays the values of all initialization parameters with the string
TARGETin the parameter name.
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 Run the following query to determine the maximum instance PGA allocated since the database was started:
select value from v$pgastat where name='maximum PGA allocated';
Compute the maximum value between the query result from step 2b and
PGA_AGGREGATE_TARGET. Add
SGA_TARGETto this value.
memory_target = sga_target + max(pga_aggregate_target, maximum PGA allocated)
For example, if
SGA_TARGETis 272M and
PGA_AGGREGATE_TARGETis 90M as shown above, and if the maximum PGA allocated is determined to be 120M, then
MEMORY_TARGETshould be at least 392M (272M + 120M).Choose the value for
MEMORY_TARGETthat you want to use.
This can be the minimum value that you computed in step 2, or you can choose to use a larger value if you have enough physical memory available.
For the
MEMORY_MAX_TARGETinitialization parameter, decide on a maximum amount of memory that you would want to allocate to the database for the foreseeable future. That is, determine the maximum value for the sum of the SGA and instance PGA sizes. This number can be larger than or the same as the
MEMORY_TARGETvalue that you chose in the previous step.
Do one of the following:
If you started your Oracle Database instance with a server parameter file, which is the default if you created the database with the Database Configuration Assistant (DBCA), enter the following command:
ALTER SYSTEM SET MEMORY_MAX_TARGET = nM SCOPE = SPFILE;
where n is the value that you computed in Step 4.
The
SCOPE
=
SPFILEclause sets the value only in the server parameter file, and not for the running instance. You must include this
SCOPEclause because
MEMORY_MAX_TARGETis not a dynamic initialization parameter.
If you started your instance with a text initialization parameter file, manually edit the file so that it contains the following statements:
memory_max_target = nM memory_target = mM
where n is the value that you determined in Step 4, and m is the value that you determined in step 3.
Note:
In a text initialization parameter file, if you omit the line for
MEMORY_MAX_TARGETand include a value for
MEMORY_TARGET, the database automatically sets
MEMORY_MAX_TARGETto the value of
MEMORY_TARGET. If you omit the line for
MEMORY_TARGETand include a value for
MEMORY_MAX_TARGET, the
MEMORY_TARGETparameter defaults to zero. After startup, you can then dynamically change
MEMORY_TARGETto a nonzero value, provided that it does not exceed the value of
MEMORY_MAX_TARGET.
Shut down and restart the database.
If you started your Oracle Database instance with a server parameter file, enter the following commands:
ALTER SYSTEM SET MEMORY_TARGET = nM; ALTER SYSTEM SET SGA_TARGET = 0; ALTER SYSTEM SET PGA_AGGREGATE_TARGET = 0;
where n is the value that you determined in step 3.
Note:
The preceding steps instruct you to set
SGA_TARGETand
PGA_AGGREGATE_TARGETto zero so that the sizes of the SGA and instance PGA are tuned up and down as required, without restrictions. You can omit the statements that set these parameter values to zero and leave either or both of the values as positive numbers. In this case, the values act as minimum values for the sizes of the SGA or instance PGA.
See Also:
相关文章推荐
- Oracle 11gR2 RAC 新特性说明
- Oracle 11gR2 RAC 新特性说明
- 11gR2 新特性:Oracle Cluster Health Monitor(CHM)简介
- 关于oracle upgrade与migration的文档
- Oracle 11gR2 Relink 脚本 新特性 说明
- Oracle 11gR2 RAC 新特性说明
- 关于oracle 11G 分区表新特性Interval
- Oracle 11gR2 Relink 脚本 新特性 说明
- 关于Oracle 11gR2中的Database Smart Flash Cache特性以及该特性所适用的操作系统
- 关于Win7 64位下:Navicat无法连接64位Oracle 11gR2:Cannot load OCI DLL 87 解决方法
- Oracle 11gR2 Relink 脚本 新特性 说明
- 【官方文档】【Doc】oracle官方文档总汇(9i,10g,11gR1, 11gR2)
- oracle联机文档
- Openfiler + Redhat 5.4 Oracle 11gR2 RAC 安装文档
- 11gR2 oracle restart特性体验
- Oracle 11gR2 Relink 脚本 新特性 说明
- Openfiler + Redhat 5.4 Oracle 11gR2 RAC 安装文档
- Oracle 11gR2 on Solaris 10安装技术文档(原版英文)
- Redhat 5.8 ORACLE 11gR2 RAC安装文档1-环境配置及准备
- Redhat 5.8 ORACLE 11gR2 RAC安装文档4-grid 安装验证