官方解释:
oracle安装文档里有这样的一段说明:
[oracle@centos6 ~]$ oerr ora 00845
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.
手工建库时出现了这个错误:
SQL> startup nomount
ORA-00845: MEMORY_TARGET not supported on this system
oracle安装文档里有这样的一段说明:
Starting with Oracle Database 11g, the Automatic Memory Management feature requires more shared memory (/dev/shm)
and file descriptors. The shared memory should be sized to be at least the greater of MEMORY_MAX_TARGET
and MEMORY_TARGET
for each Oracle instance on that computer.
简单的说,MEMORY_MAXTARGET和MEMORY_TARGET的值不能大于共享内存的大小。
下面是报错的安装环境:
[oracle@centos6 ~]$ df -h /dev/shm/
Filesystem Size Used Avail Use% Mounted on
tmpfs 935M 72K 935M 1% /dev/shm
[oracle@centos6 dbs]$ cat initorcl.ora | grep 'memory'
memory_target=1G
共享内存为935,memory_target为1G,果然是这个问题
接下里可以改变初始化参数,也可以用下面的命令增大共享内存,使之比需要设置的memory_target的值更大
[root@centos6 ~]# mount -t tmpfs shmfs -o size=1G /dev/shm
[root@centos6 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 36G 20G 14G 60% /
tmpfs 1.0G 0 1.0G 0% /dev/shm
/dev/sda1 97M 34M 59M 37% /boot
[root@centos6 ~]# vim /etc/fstab
tmpfs /dev/shm tmpfs defaults,size=1G
注意:一定要同时修改配置文件,不然重启之后参数就会丢失,修改是无效的
接下来即可正常启动