Oracle11g - ORA-00845: MEMORY_TARGET not supported on this system

本文记录了解决CentOS 6.5上Oracle Database 11g启动时遇到的ORA-00845错误过程,并通过调整memory_target参数值和增加共享内存分配解决了后续Jboss连接数据库时报ORA-27102错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

操作系统CentOS release 6.5 64-bit
数据库版本Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

启动数据库的时候,遇到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. 

有两种解决方案:

1. Reduce the value for the memory_target parameter

2. Increase the temporary memory allocation on the server. 

我先检查了我本地/dev/shm的大小:

df -h /dev/shm

然后发现才2G,于是我试图调大到4G,执行如下命令

mount -t tmpfs shmfs -o size=4g /dev/shm

然后为了确保系统重启后也能生效,我又修改了/etc/fstab这个文件,改成如下

然后Oracle DB启动成功,也能正常访问。但是我启动Jboss连接该数据库,得到了如下错误

ORA-27102: out of memory

Linux-x86_64 Error: 12: Cannot allocate memory

然后在网上搜了一堆解决方案,都没有解决该错误,然后试图调小memory_target和MEMORY_MAX_TARGET参数值的大小,

alter system set memory_max_target=1024m scope=spfile;
alter system set memory_target=1024m scope=spfile;
--查看sga和memory参数,看修改是否正确
show parameter sga;
show parameter memory;

然后重启数据库,再重启jboss,成功解决该问题。

shutdown immediate;
startup;




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值