You are currently viewing Fixing ORA-27104: system-defined limits for shared memory was misconfigured

Fixing ORA-27104: system-defined limits for shared memory was misconfigured

When starting an Oracle database, you may encounter the following error:

ORA-27104: system-defined limits for shared memory was misconfigured

This error usually indicates that the operating system’s shared memory settings do not meet the requirements of the Oracle instance.

🔍 Root Cause

This issue commonly occurs when the amount of physical memory available to the system is reduced without adjusting Oracle’s memory configuration accordingly.

For example, if you originally assigned 16 GB RAM to your virtual machine and later reduced it to 8 GB, but Oracle’s SGA settings remain unchanged, the database will fail to start due to insufficient system memory.

oracle statup error

🧪 How to Diagnose

  1. Check the alert log file for more detailed error messages. The log is typically located in:
/opt/oracle/diag/rdbms/orclcdb/ORCLCDB/alert/log.xml
log.xml gave error

2. The log file will usually show that the SGA allocation exceeds the available system memory, causing the startup process to fail.

🛠 Step-by-Step Solution

If you’re using Oracle 19c, follow these steps:

1. Generate a PFILE from the existing SPFILE

sqlplus / as sysdba
create pfile='/opt/oracle/product/19c/dbhome_1/dbs/init20240903.ora' from spfile;

2. Edit the PFILE

Open the file in a text editor and reduce the memory parameters (e.g., sga_target, sga_max_size, shared_pool_size) to a total size that fits your VM’s available memory—e.g., below 7656 MB for an 8 GB system.

oracle init file settings

3. Start the database using the modified PFILE

startup pfile='/opt/oracle/product/19c/dbhome_1/dbs/init20240903.ora';
startup using pfile

4. Recreate the SPFILE from the PFILE and restart the database

create spfile from pfile='/opt/oracle/product/19c/dbhome_1/dbs/init20240903.ora';
shutdown immediate;

Then use spfile , oracle can be normally started.

sqlplus / as sysdba
startup;
normal startup

✅ Key Takeaways

  • The ORA-27104 error indicates that Oracle’s memory settings are incompatible with the current OS-level shared memory limits.
  • The fix involves exporting the SPFILE, adjusting memory settings in a PFILE, starting the instance with that PFILE, and finally recreating the SPFILE.
  • Once corrected, your Oracle database should start normally.

Leave a Reply