ORA-00845: MEMORY_TARGET not supported on this system
操作系统版本:rhel6.5 (Red Hat Enterprise Linux Server release 6.5 (Santiago))
数据库版本:11.2.0.4
现象:
Oracle 11g数据库修改spfile参数后启动数据库报错ora-00845
SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system
官方文档:
Starting with Oracle Database 11g, the Automatic Memory Management feature requires more shared memory (/dev/shm)and file descriptors. The size of the shared memory should be at least the greater of MEMORY_MAX_TARGET and MEMORY_TARGET for each Oracle instance on the computer. If MEMORY_MAX_TARGET or MEMORY_TARGET is set to a non zero value, and an incorrect size is assigned to the shared memory, it will result in an ORA-00845 error at startup.
If you are installing Oracle 11g on a Linux system, note that Memory Size (SGA and PGA), which sets the initialization parameter MEMORY_TARGET or MEMORY_MAX_TARGET, cannot be greater than the shared memory filesystem (/dev/shm) on your operating system. To resolve the current error, increase the /dev/shm file size.
If configuring AMM is not possible due to lack of space on /dev/shm mount point, you can configure ASMM instead of AMM, i.e. set SGA_TARGET, SGA_MAX_SIZE and PGA_AGGREGATE_TARGET instead of MEMORY_TARGET.
在oracle 11g中新增的内存自动管理的参数MEMORY_TARGET,它能自动调整SGA和PGA,这个特性需要用到/dev/shm共享文件系统,而且要求/dev/shm必须大于MEMORY_TARGET,如果/dev/shm比MEMORY_TARGET小就会报错。
解决方案:
Action: Increase the /dev/shm
mountpoint size. For example:
# mount -t tmpfs shmfs -o size=4g /dev/shm
Also, to make this change persistent across system restarts, add an entry in /etc/fstab
similar to the following:
shmfs /dev/shm tmpfs size=7g 0 0