ORA-00845: MEMORY_TARGET not supported on this system

本文详细阐述了如何解决在启动Oracle数据库instance到nomount状态时遇到的MEMORY_TARGET不支持的错误。通过调整/etc/fstab中/dev/shm的大小,成功解决了内存配置不匹配的问题。

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

在启动数据库instance到nomount过程中遇到以下错误:

SQL> startup nomount
ORA-00845: MEMORY_TARGET not supported on this system
SQL> 


Cause:

查看错误解释:

[oracle@localhost~]$ oerr ora 00845

00845, 00000,"MEMORY_TARGET not supported on this system"

// *Cause: TheMEMORY_TARGET parameter was not supported on this operating system or /dev/shmwas not sized correctly on Linux.

// *Action: Refer todocumentation for a list of supported operating systems. Or, size /dev/shm tobe at least the SGA_MAX_SIZE on each Oracle instance running on the system.


从这里我可以看出有两种可能

1、是当前操作系统不支持,扯淡,redhat都不支持还能支持啥。

2、是/dev/shm 的大小设置不正确,看来原因就是他了。


查看当前的文件系统状况:

[oracle@localhost ~]$ df -h /dev/shm
Filesystem            Size  Used Avail Use% Mounted on
tmpfs                1004M     0 1004M   0% /dev/shm
[oracle@localhost ~]$


是1004M,怎么就设置不正确了,跟谁比较呢?由于是在将实例启动到nomount过程中出现的错误,这过程中唯一被读取的就是初始化参数文件啦(initXXX.ora),那他肯定脱不了干系。

[oracle@localhost dbs]$ pwd
/u01/app/oracle/product/11.2.0/db_11g/dbs
[oracle@localhost dbs]$ grep -i MEMORY_TARGET initPROD.ora
*.memory_target=1G
[oracle@localhost dbs]$

查看发现,设置的是1G,比1004M大一丢丢,1G的memory对数据库来说已经是最低配置了,所以考虑增加/dev/shm/的大小。


Solution:

在/etc/fstab中,添加如下行:

tmpfs                   /dev/shm                tmpfs   defaults,size=1500M      0 0

然后执行以下命令:

[root@localhost ~]# mount -o remount /dev/shm
[root@localhost ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
tmpfs                 1.5G     0  1.5G   0% /dev/shm


修改完毕后,再来一次:

SQL>  startup nomount pfile=/u01/app/oracle/product/11.2.0/db_11g/dbs/initPROD.ora
ORACLE instance started.

Total System Global Area 1068937216 bytes
Fixed Size                  2220200 bytes
Variable Size             616566616 bytes
Database Buffers          444596224 bytes
Redo Buffers                5554176 bytes

ok了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值