环境:centos 6.2 x86-64 oracle11gR2
修改内存启动时报错(ORA-00845),官方文档描述如下:
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.
示例:
SQL> alter system set memory_max_target=4G scope=spfile;
System altered.
SQL> alter system set memory_target=4G scope=spfile;
System altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system
SQL> exit
已断开连接
[oracle@source ~]$ df -h | grep shm
tmpfs 3.0G 88K 3.0G 1% /dev/shm
[oracle@source ~]$ su - root
Password:
[root@source ~]# vi /etc/fstab
内容:
tmpfs /dev/shm tmpfs defaults,size=6g 0 0
[root@source ~]# mount -o remount /dev/shm
[root@source ~]# df -h | grep shm
tmpfs 6.0G 88K 6.0G 1% /dev/shm
[root@source ~]# exit
logout
[oracle@source ~]$ sqlplus / as sysdba;
SQL*Plus: Release 11.2.0.2.0 Production on 星期三 11月 14 19:27:18 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
已连接到空闲例程。
SQL> startup;
ORACLE 例程已经启动。
Total System Global Area 4275781632 bytes
Fixed Size 2233336 bytes
Variable Size 2113932296 bytes
Database Buffers 2147483648 bytes
Redo Buffers 12132352 bytes
数据库装载完毕。
数据库已经打开。
SQL>
--转自