时间:2021-07-01 10:21:17 帮助过:23人阅读
来自Oracle的官方解析是:Starting with Oracle Database 11g, the Automatic Memory Management feature requires more shared
今天把虚拟机的内存改小了一点,,然后启动数据的时候就出现如下错误:
SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system
我猜想应该是系统内存和sga冲突的问题,后来到网上查了一下,果然如此:
来自Oracle的官方解析是:
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.
也就是由于设置SGA的大小超过了操作系统/dev/shm的大小:
解决这个问题只有两个方法,一种是修改初始化参数,使得初始化参数中SGA的设置小于/dev/shm的大小,另一种方法就是调整/dev/shm的大小。
一.修改/dev/shm的大小
root 登录
将上面的size改成超过sga的大小。然后重启或者重新挂载
#umount /dev/shm
#mount /dev/shm
二.修改sga的大小
然后重新启动数据库。