美文网首页
ORA-00845: MEMORY_TARGET not sup

ORA-00845: MEMORY_TARGET not sup

作者: 平面小狮子 | 来源:发表于2020-06-29 23:57 被阅读0次

oracle11g启动报错,无法正常使用,想到之前有新闻,程序猿被起诉坐牢的事件,软件行业竟恐怖如斯,于是乎洪荒之力爆发,面红耳赤的唤醒了百度大法好。

SQL> startup; 
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 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.

简单来说就是 MEMORY_MAX_TARGET 的设置不能超过 /dev/shm 的大小
[oracle@localhost]$ df -h | grep shm
tmpfs                 2.0G     0  2.0G   0% /dev/shm

既然如此,那就如愿以偿加大大大再大

[root@localhost ~]# cat /etc/fstab | grep tmpfs
tmpfs                   /dev/shm                tmpfs   defaults,size=12G 0 0

可以通过重启使这个配置生效,也可以通过重新挂载来修改其大小:

[root@localhost ~]# mount -o remount,size=4G /dev/shm
[root@localhost ~]# df -h | grep shm
tmpfs                 120G     0  12.0G   0% /dev/shm

*** 至此问题解决,打卡下班。 ***

相关文章

网友评论

      本文标题:ORA-00845: MEMORY_TARGET not sup

      本文链接:https://www.haomeiwen.com/subject/eavzfktx.html