Databases 8 min read

How to Switch Oracle 11g Between ASMM and AMM – Step-by-Step

This guide demonstrates how to switch Oracle Database 11g between Automatic Shared Memory Management (ASMM) and Automatic Memory Management (AMM), covering environment setup, parameter adjustments, spfile/pfile handling, restart procedures, and troubleshooting, with concrete SQL commands and shared‑memory observations.

ITPUB
ITPUB
ITPUB
How to Switch Oracle 11g Between ASMM and AMM – Step-by-Step

1. Experiment Environment

We use Oracle Database 11.2.0.3 on a Linux host, initially running with ASMM (Automatic Shared Memory Management). The version is verified with select * from v$version; and the current memory settings show memory_target=0 and memory_max_target=0, indicating AMM is disabled.

2. Switching from ASMM to AMM

In 11g, setting memory_target and memory_max_target to non‑zero values enables AMM. Before changing parameters, we back up the spfile with create pfile from spfile;. Then we execute the following ALTER SYSTEM commands (scope=spfile):

alter system set memory_max_target=360m scope=spfile;
alter system set memory_target=360m scope=spfile;
alter system set sga_target=0m scope=spfile;
alter system set sga_max_size=0 scope=spfile;
alter system set pga_aggregate_target=0 scope=spfile;

After restarting the instance, show parameter target confirms that both MEMORY_TARGET and MEMORY_MAX_TARGET are 360M while SGA_TARGET and PGA_AGGREGATE_TARGET are 0, meaning AMM is active and the shared memory segment becomes a virtual segment. The ipcs -m output shows small 4 KB segments.

3. Switching back from AMM to ASMM

To disable AMM completely, set both MEMORY_TARGET and MEMORY_MAX_TARGET to 0, then assign explicit values to SGA and PGA:

alter system set memory_max_target=0 scope=spfile;
alter system set memory_target=0 scope=spfile;
alter system set pga_aggregate_target=100m scope=spfile;
alter system set sga_target=260m scope=spfile;
alter system set sga_max_size=260m scope=spfile;

A subsequent startup fails with ORA‑00843 and ORA‑00849 because the SGA_TARGET exceeds the zero MEMORY_MAX_TARGET. The fix is to recreate the spfile from a pfile that omits the explicit MEMORY_TARGET entries. After creating a pfile ( create pfile from spfile;), editing out the lines *.memory_target=0 and *.memory_max_target=0, and then creating a new spfile ( create spfile from pfile;), the database starts successfully with ASMM enabled.

4. Conclusion

AMM and ASMM are essential Oracle memory‑management tools; AMM offers convenient automatic tuning, while ASMM provides real shared memory segments. In certain scenarios, such as when using HugePages, switching back to ASMM may be necessary.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

memory-managementSQLOracleDatabase AdministrationAMMASMM
ITPUB
Written by

ITPUB

Official ITPUB account sharing technical insights, community news, and exciting events.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.