SAP Knowledge Base Article - Preview

1873631 - Solving Oracle memory issues


This document is meant to be both a solution for the issues below as well as a general recommendation for memory settings.

After the system is running for a while, you starting receiving ORA-04031 errors.

ORA-04031: unable to allocate <bytes> bytes of shared memory

You have already checked the following SAP Notes but they didn't help:

  • 1472386 - ORA-04031 out of memory error in BW systems
  • 1478228 - Oracle ORA-4031 WHEN GATHER STATS IN PARALLEL
  • 869006 - Composite SAP note: ORA-04031
  • 690241 - The Shared SQL Area in the Shared Pool and large SQL Stmnts

If you did not check this notes yet, please make sure you go through them before applying the solution proposed here.



  • SAP systems based on NetWeaver;
  • Oracle database
  • Automatic Shared Memory Management (ASMM) or Automatic Memory Management (AMM) enabled.


SAP NetWeaver all versions


overflow buffer user session fails crash ORA-04030 shared pool buffer cache stop abort hang sga system global area memory pga program work process fail sga_max_size ORA-04031 , KBA , BC-DB-ORA , Oracle , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.