Monday, January 14, 2013

ORA-00845: MEMORY_TARGET not supported on this system

Symptoms

During the startup of database instance the following error is raised:

SQL> connect sys as sysdba
Enter password:
Connected to an idle instance.
SQL> STARTUP NOMOUNT
ORA-00845: MEMORY_TARGET not supported on this system

Cause
The new AMM functionality uses /dev/shm on Linux for SGA and PGA management. The error occur if either MEMORY_TARGET or MEMORY_TARGET is configured larger than the configured /dev/shm size, or if /dev/shm is mounted incorrectly.
Solution
Please confirm that ORACLE_HOME is set correctly. This error sometimes happens when it is not set correctly.
Make sure that the /dev/shm size configured large enough, like in:
# mount -t tmpfs shmfs -o size=12g /dev/shm
In this case the size of the shared memory device is configured to be 12GB.
In order to make the same change persistent across system reboots, add an entry for this to the /etc/fstab mount table, as in:
shmfs /dev/shm tmpfs size=12g 0
Make sure that the df output shows the correct /dev/shm configuration when using Oracle on the system:
$ df -k
Filesystem 1K-blocks Used Available Use% Mounted on
...
shmfs 6291456 832356 5459100 14% /dev/shm

How do restrict or modify size of /dev/shm permanently?
You need to add or modify entry in /etc/fstab file so that system can read it after the reboot.
To changes to take effect immediately remount /dev/shm.
# mount -o remount /dev/shm

No comments: