Oracle Database Error Solutions – Easy & Practical Guides

Welcome to a dedicated platform for solving common Oracle Database errors like ORA-01194, ORA-01555, ORA-01017, ORA-12154 and more.

Learn step-by-step solutions, real-world troubleshooting, and best practices to handle Oracle issues efficiently.

View All Oracle Error Solutions

ORA-00845: MEMORY_TARGET Not Supported on This System – Complete Oracle DBA Solution Guide

ORA-00845: MEMORY_TARGET Not Supported on This System – Complete Oracle DBA Solution Guide

The ORA-00845: MEMORY_TARGET not supported on this system error is a common Oracle Database startup issue that occurs when Oracle's Automatic Memory Management (AMM) feature cannot allocate shared memory resources required by the operating system.

This error is most frequently encountered on Linux environments during:

  • Oracle Database installation
  • Database startup
  • Memory parameter configuration changes
  • Database cloning and migrations
  • Oracle upgrades

Although the error appears straightforward, it is often confusing because the database parameter settings may appear correct while the underlying operating system configuration is preventing Oracle from starting successfully.

In this complete Oracle DBA troubleshooting guide, you will learn:

  • What ORA-00845 means
  • Why the error occurs
  • How Automatic Memory Management works
  • How Linux shared memory affects Oracle
  • Step-by-step solutions
  • Alternative memory configuration methods
  • Best practices for production environments
  • Frequently asked questions

What is ORA-00845?

ORA-00845 occurs when Oracle attempts to use the MEMORY_TARGET parameter but cannot access sufficient shared memory resources from the operating system.

The typical error message appears as:

ORA-00845: MEMORY_TARGET not supported on this system

This prevents the database instance from starting successfully.


Quick Solution

Increase the size of the Linux /dev/shm filesystem or disable Automatic Memory Management and use SGA_TARGET and PGA_AGGREGATE_TARGET instead.


Understanding MEMORY_TARGET

Oracle introduced Automatic Memory Management (AMM) to simplify database memory administration.

Instead of manually tuning:

  • SGA (System Global Area)
  • PGA (Program Global Area)

Oracle dynamically adjusts memory allocation based on workload.

This is controlled using:

MEMORY_TARGET
MEMORY_MAX_TARGET

Example:

SQL> ALTER SYSTEM SET MEMORY_TARGET=4G SCOPE=SPFILE;
SQL> ALTER SYSTEM SET MEMORY_MAX_TARGET=4G SCOPE=SPFILE;

Why ORA-00845 Occurs

Oracle relies on the Linux shared memory filesystem /dev/shm when AMM is enabled.

If MEMORY_TARGET is larger than the available shared memory size, Oracle cannot allocate memory and startup fails.

Common causes include:

  • Small /dev/shm allocation
  • Incorrect Linux memory configuration
  • VM templates with limited shared memory
  • Server migrations
  • Oracle upgrades
  • Cloud instance resizing

How to Verify the Problem

Check MEMORY_TARGET

SQL> SHOW PARAMETER MEMORY_TARGET;

Check MEMORY_MAX_TARGET

SQL> SHOW PARAMETER MEMORY_MAX_TARGET;

Check Linux Shared Memory

df -h /dev/shm

Example output:

Filesystem Size Used Avail Use%
tmpfs      2G    0   2G   0%

If Oracle is configured for 4 GB MEMORY_TARGET but /dev/shm is only 2 GB, ORA-00845 occurs.


Solution 1: Increase /dev/shm Size

This is the most common and recommended solution.

Check Current Configuration

mount | grep shm

Temporary Resize

mount -o remount,size=8G /dev/shm

Permanent Resize

Edit:

/etc/fstab

Add or modify:

tmpfs /dev/shm tmpfs defaults,size=8G 0 0

Remount:

mount -o remount /dev/shm

Restart Database

SQL> startup;

The database should now start successfully.


Solution 2: Disable AMM and Use ASMM

Many production environments avoid AMM and use Automatic Shared Memory Management (ASMM).

Advantages include:

  • Better performance
  • More predictable memory usage
  • Preferred by many Oracle DBAs

Disable MEMORY_TARGET

SQL> ALTER SYSTEM SET MEMORY_TARGET=0 SCOPE=SPFILE;
SQL> ALTER SYSTEM SET MEMORY_MAX_TARGET=0 SCOPE=SPFILE;

Configure SGA and PGA

SQL> ALTER SYSTEM SET SGA_TARGET=3G SCOPE=SPFILE;
SQL> ALTER SYSTEM SET PGA_AGGREGATE_TARGET=1G SCOPE=SPFILE;

Restart Database

SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP;

Verify Memory Configuration

Check SGA Settings

SQL> SHOW PARAMETER SGA;

Check PGA Settings

SQL> SHOW PARAMETER PGA;

Check Memory Components

SQL> SELECT component, current_size/1024/1024 MB
FROM v$memory_dynamic_components;

Real-World Production Scenario

A production Oracle 19c database was migrated from a physical server to a virtual machine.

After migration, the database failed during startup with:

ORA-00845: MEMORY_TARGET not supported on this system

Investigation showed:

  • MEMORY_TARGET = 8 GB
  • /dev/shm = 4 GB

The virtualization platform had reduced shared memory allocation during migration.

After increasing /dev/shm to 10 GB and restarting the instance, the database started successfully.


Difference Between AMM and ASMM

Feature AMM ASMM
Memory Management Automatic SGA + PGA Automatic SGA Only
MEMORY_TARGET Required Not Required
/dev/shm Dependency Yes No
Production Usage Less Common Highly Recommended

Common DBA Mistakes

  • Configuring MEMORY_TARGET larger than /dev/shm
  • Ignoring Linux shared memory limits
  • Changing memory settings without validation
  • Using AMM in large production databases without planning
  • Not reviewing Oracle alert logs

Useful Diagnostic Commands

Check Memory Parameters

SQL> SHOW PARAMETER MEMORY;

Check Alert Log

adrci
show alert -tail 100

Check Linux Memory

free -g

Check Shared Memory

df -h /dev/shm

Best Practices

  • Use ASMM for production databases
  • Size shared memory correctly
  • Monitor memory utilization regularly
  • Review Oracle alert logs frequently
  • Document memory configurations
  • Validate settings after migrations
  • Test memory changes in non-production environments

Performance Considerations

Proper memory sizing directly affects:

  • SQL execution performance
  • Buffer cache efficiency
  • Sort operations
  • Database throughput
  • Application response time

Poor memory configuration can lead to excessive disk I/O, slow queries, and application performance issues.


Frequently Asked Questions (FAQ)

What causes ORA-00845?

Oracle cannot allocate MEMORY_TARGET because Linux shared memory is insufficient.

How do I check /dev/shm size?

df -h /dev/shm

Is AMM recommended for production?

Many Oracle DBAs prefer ASMM because it provides more predictable performance and avoids /dev/shm dependency.

Can I disable MEMORY_TARGET?

Yes. Configure SGA_TARGET and PGA_AGGREGATE_TARGET instead.

Will increasing /dev/shm fix ORA-00845?

In most cases, yes. The shared memory filesystem must be larger than MEMORY_TARGET.


Related Posts

👉 Check our complete guide: Oracle Error Codes Guide


Conclusion

ORA-00845 is a common Oracle startup issue caused by insufficient Linux shared memory when Automatic Memory Management is enabled.

Understanding the relationship between MEMORY_TARGET and /dev/shm is essential for Oracle DBAs managing Linux-based databases.

Whether you choose to increase shared memory or move to ASMM, proper memory planning and monitoring are critical for stable Oracle database performance and availability.

Your comments, especially which will help us improve the functionality, will be greatly appreciated. Do not forget to follow my Blog.

No comments:

Post a Comment

Contact / Feedback Form

Name

Email *

Message *