131.Exhibit:
View the Exhibit to examine the parameter values. You are planning to set the value for the
MEMORY_TARGET parameter of your database instance.
What value would you assign?
A. 1440 MB
B. 90 MB
C. 362 MB
D. 272 MB
Answer: C
答案解析:
参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/memory.htm#ADMIN11201
memory_target = sga_target + max(pga_aggregate_target, maximum PGA allocated)
if SGA_TARGET
is 272M and PGA_AGGREGATE_TARGET
is 90M as shown above, and if the maximum PGA allocated is determined to be 80M, then MEMORY_TARGET
should be at least 362M (272M + 90M).
Enabling Automatic Memory Management
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 DATABASE
SQL 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
.See "Connecting to the Database with SQL*Plus" and "Database Administrator Authentication" for instructions.
-
Calculate the minimum value for
MEMORY_TARGET
as follows:-
Determine the current sizes of
SGA_TARGET
andPGA_AGGREGATE_TARGET
by entering the following SQL*Plus command:SHOW PARAMETER TARGETSQL*Plus displays the values of all initialization parameters with the string
TARGET
in the parameter name.NAME TYPE VALUE------------------------------------ ----------- ----------------archive_lag_target integer 0db_flashback_retention_target integer 1440fast_start_io_target integer 0fast_start_mttr_target integer 0memory_max_target big integer 0memory_target big integer 0parallel_servers_target integer 16pga_aggregate_target big integer 90Msga_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
. AddSGA_TARGET
to this value.memory_target = sga_target + max(pga_aggregate_target, maximum PGA allocated)
For example, if
SGA_TARGET
is 272M andPGA_AGGREGATE_TARGET
is 90M as shown above, and if the maximum PGA allocated is determined to be 120M, thenMEMORY_TARGET
should be at least 392M (272M + 120M). -
-
Choose the value for
MEMORY_TARGET
that 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_TARGET
initialization 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 theMEMORY_TARGET
value 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
=
SPFILE
clause sets the value only in the server parameter file, and not for the running instance. You must include thisSCOPE
clause becauseMEMORY_MAX_TARGET
is 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 = nMmemory_target =mMwhere 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 forMEMORY_MAX_TARGET
and include a value forMEMORY_TARGET
, the database automatically setsMEMORY_MAX_TARGET
to the value ofMEMORY_TARGET
. If you omit the line forMEMORY_TARGET
and include a value forMEMORY_MAX_TARGET
, theMEMORY_TARGET
parameter defaults to zero. After startup, you can then dynamically changeMEMORY_TARGET
to a nonzero value, provided that it does not exceed the value ofMEMORY_MAX_TARGET
. -
-
Shut down and restart the database.
See Chapter 3, "Starting Up and Shutting Down" for instructions.
-
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 setSGA_TARGET
and
PGA_AGGREGATE_TARGET
to 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.