前段时间在虚拟机上装了个oracle11g,最近做测试,电脑资源有点紧张,把分配的4G内存改为2G内存了,在启动oracle的时候,会报如下错误
[oracle@oracleserver ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Sun Aug 10 00:08:44 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system
SQL>
查了下资料,了解到
在oracle 11g中新增的内存自动管理的参数MEMORY_TARGET,这个参数与/dev/shm有关,要求/dev/shm必须大于MEMORY_TARGET,否则就会报这个错误。
我现在的MEMORY_TRAGET是1024M,而/dev/shm只有1000M。
所以在增加一下shm的大小
vi /etc/fstab
修改下
#tmpfs /dev/shm tmpfs defaults 0 0
tmpfs /dev/shm tmpfs defaults,size=2G 0 0
保存后从新mount一下
[root@oracleserver ~]# vi /etc/fstab
[root@oracleserver ~]# mount -o remount /dev/shm
再去启动下数据库
SQL> startup
ORACLE instance started.
Total System Global Area 1068937216 bytes
Fixed Size 2220200 bytes
Variable Size 633343832 bytes
Database Buffers 427819008 bytes
Redo Buffers 5554176 bytes
Database mounted.
Database opened.
SQL>