ORA-00845: MEMORY_TARGET not supported on this system

1.修改memory_target
SQL> alter system set memory_target=6g scope=spfile;

System altered.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@localhost myshell]$ echo $ORACLE_SID
slnngk
[oracle@localhost myshell]$
[oracle@localhost myshell]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.4.0 Production on Sat Dec 29 15:33:47 2018

Copyright (c) 1982, 2013, Oracle. All rights reserved.

SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system

官方解释:
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 5.8G 0 5.8G 0% /dev/shm

2.修改/etc/fstab文件
[root@localhost ~]# cat /etc/fstab | grep tmpfs
tmpfs /dev/shm tmpfs defaults,size=8G 0 0

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

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

3.再次启动
SQL> startup
ORACLE instance started.

Total System Global Area 6413680640 bytes
Fixed Size 2265224 bytes
Variable Size 3489664888 bytes
Database Buffers 2902458368 bytes
Redo Buffers 19292160 bytes
Database mounted.
Database opened.

-- The End --

posted @   slnngk  阅读(673)  评论(0编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
点击右上角即可分享
微信分享提示