Resolving ORA-00845: MEMORY_TARGET not supported on this system

Made some changes related to Automatic Memory Management (MEMORY_TARGET, MEMORY_MAX_TARGET) and when re-started the database got ORA-00845 ? Or starting another Oracle Instance on the server which was down from quite a while and facing ORA-00845 ?

In any case if you ever face ORA-00845 and unable to start your Oracle instance this post would guide you why you get the error and also how to resolve the error.

If you use Oracle’s oerr utility for this error, you’ll get:-

$ oerr ORA 845
00845, 00000, "MEMORY_TARGET not supported on this system"
// *Cause: The MEMORY_TARGET parameter was not supported on this operating system or /dev/shm was not sized correctly on Linux.
// *Action: Refer to documentation for a list of supported operating systems. Or, size /dev/shm to be at least the SGA_MAX_SIZE on each Oracle instance running on the system.

So from this we get the hint that its something to do with shared memory /dev/shm. So here Oracle is complaining that the AMM configuration that you have configured cannot be applied because the shared memory /dev/shm available on the server is less than the size you have specified in the DB setting. That means we now have to increase the shared memory configuration (/dev/shm) of the server.

Now that we know we need to increase /dev/shm, the question is by how much ? For that take a look at your alert log file, you’ll notice the error message has all the details you need:-

WARNING: You are trying to use the MEMORY_TARGET feature.
This feature requires the /dev/shm file system to be mounted for at Least <size> bytes.The /dev/shm is either not mounted or is mounted with available space less than this size.
Please fix this so that MEMORY_TARGET can work as expected. Current available is <size> and used is <size> bytes.memory_target needs larger /dev/shm

From here you can get the minimum size that is required for /dev/shm to start the instance with the configuration you have chosen for AMM:-

This feature requires the /dev/shm file system to be mounted for at Least bytes.

Now if you have sudo rights you can proceed as below to re-mount the tmpfs with increased size or can assign this task to the system admins.

STEP:1- Mount the tmpfs with the desired size:-

mount -t tmpfs shmfs -o size=<SIZE fetched from alert log> /dev/shm

After executing the above command check the status with df -h command.

STEP:2- Make this change permanent by adding below line in /etc/fstab:-

shmfs /dev/shm tmpfs size=1073741824 0

Now start the database and you would see that the error is resolved and the instance is started with the memory settings that you specified.

Please comment below if you stuck anywhere in following the procedure mentioned above, so that we could work along with you in resolving your issue.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.