oracle11g数据库在执行dbca或者调整sga后重启oracle的时候可能会出现ORA-00845 MEMORY_TARGET not supported on this system 错误。
究其原因就是Linux系统的shm的大小比SGA设置的小,造成的,距离来说,SGA设置4G,而shm可能只有1G
网上提供两种解决办法:
01、调整sga的大小,这个明显不是我们所希望的
02、调整shm的大小,这样相对简单,具体操作如下
vi /etc/fstab
修改如下行的设置
tmpfs /dev/shm tmpfs defaults 0 0
改成
tmpfs /dev/shm tmpfs defaults,size=6G 0 0
保存退出
重新mount下shm使其生效
mount -o remount /dev/shm
通过df可以查看下,没有问题就可以继续安装数据库或者启动数据库了!
说明:服务器上有两个不同数据库实例,启动一个实例的时候没问题。在启动第二个INSTANCE的时候报ORA-00845错误。该测试服务器仅8G内存。
[oracle@BJRMANTS ~]$ su - root
Password:
[root@BJRMANTS ~]# vi /etc/fstab
[root@BJRMANTS ~]# df -g
df: invalid option -- 'g'
Try `df --help' for more information.
[root@BJRMANTS ~]# df -h
Filesystem
/dev/sda2
tmpfs
/dev/sda1
/dev/sda6
/dev/sda8
/dev/sda5
/dev/sda7
[root@BJRMANTS ~]# mount -o remount /dev/shm
[root@BJRMANTS ~]# df -h
Filesystem
/dev/sda2
tmpfs
/dev/sda1
/dev/sda6
/dev/sda8
/dev/sda5
/dev/sda7
[root@BJRMANTS ~]#
[oracle@BJRMANTS ~]$ export ORACLE_SID=oelncbi
[oracle@BJRMANTS ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Dec 5 10:48:51 2012
Copyright (c) 1982, 2011, Oracle.
Connected to an idle instance.
SQL> startup;
ORA-00845: MEMORY_TARGET not supported on this system
SQL> exit
Disconnected
[oracle@BJRMANTS ~]$ export ORACLE_SID=oeldzdz
[oracle@BJRMANTS ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Dec 5 10:49:33 2012
Copyright (c) 1982, 2011, Oracle.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> shutdown abort;
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@BJRMANTS ~]$ export ORACLE_SID=oelncbi
[oracle@BJRMANTS ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Dec 5 10:49:51 2012
Copyright (c) 1982, 2011, Oracle.
Connected to an idle instance.
SQL> startup;
ORACLE instance started.
Total System Global Area
Fixed Size
Variable Size
Database Buffers
Redo Buffers
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@BJRMANTS ~]$ export ORACLE_SID=oeldzdz
[oracle@BJRMANTS ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Dec 5 10:54:15 2012
Copyright (c) 1982, 2011, Oracle.
Connected to an idle instance.
SQL> startup;
ORACLE instance started.
Total System Global Area 2805977088 bytes
Fixed Size
Variable Size
Database Buffers
Redo Buffers
Database mounted.
Database opened.
SQL>