ORA-00845: MEMORY_TARGET not supported on this system

来源:互联网 发布:数据库教程 pdf 编辑:程序博客网 时间:2024/06/08 09:44
发现自己的RAC测试数据库宕掉了,启动数据库实例时报错:

ORA-00845: MEMORY_TARGET not supported on this system

随后查询日志文件,下面是一部分内容

Tue Nov 25 09:52:47 2014
Starting ORACLE instance (normal)
WARNING: You are trying to use the MEMORY_TARGET feature. This feature requires
 the /dev/shm file system to be mounted for at least 1610612736 bytes. /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 i
s 874381312 and used is 1135521792 bytes. Ensure that the mount point is /dev/s
hm for this directory.
memory_target needs larger /dev/shm
Process W000 died, see its trace file
Tue Nov 25 09:52:51 2014
Process W000 died, see its trace file
Process W000 died, see its trace file

也就是说我们需要改变/dev/shm的大小。

首先修改/etc/fstab,将这一行

tmpfs      /dev/shm      tmpfs     defaults      0 0

改为:

tmpfs      /dev/shm      tmpfs     defaults,size=2560M        0 0

然后重新挂载,执行命令

mount -o remount /dev/shm

再次查看tmpfs大小

[root@node2 ~]# df -h
文件系统              容量  已用  可用 已用%% 挂载点
/dev/sda9            1008M  248M  709M  26% /
tmpfs                 2.5G  1.1G  1.5G  43% /dev/shm
/dev/sda1              97M   32M   61M  35% /boot
/dev/sda5             2.0G   70M  1.9G   4% /home
/dev/sda10           1008M   37M  920M   4% /opt
/dev/sda6             2.0G   68M  1.9G   4% /tmp
/dev/sda2             4.0G  3.1G  680M  83% /usr
/dev/sda7             2.0G   68M  1.9G   4% /usr/local
/dev/sda3             4.0G  550M  3.3G  15% /var
/dev/sda11             20G  8.6G   11G  46% /u01

修改成功,数据库可以正常启动了。

查看oralce文档,有下面的说明

Automatic Memory Management
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 must be at least the greater of the MEMORY_MAX_TARGET and MEMORY_TARGET parameters for each Oracle instance on the computer. If the MEMORY_MAX_TARGET parameter or the MEMORY_TARGET parameter is set to a nonzero value, and an incorrect size is assigned to the shared memory, it results in an ORA-00845 error at startup. On Linux systems, if the operating system /dev/shm mount size is too small for the Oracle system global area (SGA) and program global area (PGA), it results in an ORA-00845 error.

11g开始,AMM使用/dev/shm,并且其可用值要大于MEMORY_TARGET参数。

而/dev/shm默认大小为总内存的一半,在内存较小的(<8G)服务器上安装Oracle可能需要重新调整/dev/shm的大小。


0 0
原创粉丝点击