博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ORA-00845 MEMORY_TARGET not supported on this system
阅读量:4256 次
发布时间:2019-05-26

本文共 6236 字,大约阅读时间需要 20 分钟。

ORA-
00845: MEMORY_TARGET not supported on this system
我建立虚拟机的时候 选择的是8G的内存,但是检查的时候报错,我只有4G提示 Swap分区不够,
其实是可以使用DD命令解决的。 
GG 同步不起。

解决Linux上11g的ORA-00845错误

下午想把一个11.2.0.2实例的memory_target AMM内存初始化参数修改到2000M,改好后重启发现实例起不来了,出现了ORA-00845错误:

[oracle@rh2 ~]$ [oracle@rh2 ~]$ sqlplus  / as sysdbaSQL*Plus: Release 11.2.0.2.0 Production on Tue May 3 19:43:50 2011Copyright (c) 1982, 2010, Oracle.  All rights reserved.Connected to an idle instance.SQL> startup nomount;ORA-00845: MEMORY_TARGET not supported on this system======================= ALERT.LOG======================Starting ORACLE instance (normal)WARNING: You are trying to use the MEMORY_TARGET feature. This feature requires the /dev/shm file system to be mounted for at least 2097152000 bytes. /dev/shm is either not mounted or is mounted with available space less than this size. Please fix this so that MEMORY_TARGET can work as expected. Current available is 1871466496 and used is 200790016 bytes. Ensure that the mount point is /dev/shm for this directory.memory_target needs larger /dev/shm

看起来是因为采用了Automatic Memory Management的特性,所以Oracle采用了一种基于POSIX的共享内存使用风格,在AMM中Oracle不像之前版本那样利用”一整块”内存作为SGA,而是使用一块块小的”chunk”,以满足SGA与PGA之前交换内存的目的

针对上述ORA-00845错误,我们需要修改映射内存文件夹/dev/shm的装载参数,针对正在运行的Linux操作系统,可以remount这个tmpfs装载点,如:

[root@rh2 ~]# umount /dev/shmumount: /dev/shm: device is busyumount: /dev/shm: device is busy[root@rh2 ~]# ls /dev/shmJOXSHM_EXT_0_PROD1_8323079   JOXSHM_EXT_25_PROD1_8323079  ora_+ASM1_7569414_11  JOXSHM_EXT_10_PROD1_8323079  JOXSHM_EXT_26_PROD1_8323079  ora_+ASM1_7569414_12  ............/* 可以看到如果ASM实例也使用AMM的话同样会在/dev/shm目录下产生内存映像     为了umount该装载点,我们不得不首先shutdown ASM instance ! */[root@rh2 ~]# su - grid[grid@rh2 ~]$ sqlplus  / as sysdbaSQL*Plus: Release 11.2.0.2.0 Production on Tue May 3 20:05:24 2011Copyright (c) 1982, 2010, Oracle.  All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit ProductionWith the Real Application Clusters and Automatic Storage Management optionsSQL> shutdown immediate;ORA-01031: insufficient privilegesSQL> exitDisconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit ProductionWith the Real Application Clusters and Automatic Storage Management options[grid@rh2 ~]$ sqlplus  / as sysasmSQL*Plus: Release 11.2.0.2.0 Production on Tue May 3 20:05:32 2011Copyright (c) 1982, 2010, Oracle.  All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit ProductionWith the Real Application Clusters and Automatic Storage Management optionsSQL> shutdown immediate;ORA-15097: cannot SHUTDOWN ASM instance with connected client (process 1576)SQL> shutdown abort;ASM instance shutdownSQL> exitDisconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit ProductionWith the Real Application Clusters and Automatic Storage Management options[root@rh2 ~]# umount /dev/shm[root@rh2 ~]# mount -t tmpfs shmfs -o size=4000m /dev/shm/* 这里的size指定了shm目录的装载大小,4000m可能对你的系统仍然不够,    那么你有理由设一个更大的值  */[root@rh2 ~]# mount|grep shmfsshmfs on /dev/shm type tmpfs (rw,size=4000m)Startup ASM...........[root@rh2 ~]# su - oracle[oracle@rh2 ~]$ sqlplus  / as sysdbaSQL*Plus: Release 11.2.0.2.0 Production on Tue May 3 20:09:40 2011Copyright (c) 1982, 2010, Oracle.  All rights reserved.Connected to an idle instance.SQL> startup nomount;ORACLE instance started.Total System Global Area 2087780352 bytesFixed Size                  2228072 bytesVariable Size            1476395160 bytesDatabase Buffers          603979776 bytesRedo Buffers                5177344 bytes/* 实例启动成功! */

上述umount/mount的方式只在操作系统的此次生命周期中生效,如果重启的话shmfs目录仍会以默认方式装载;如果需要永久生效的话,我们需要修改系统参数文件/etc/fstab中的shm条目:

/* 修改前的shm装载参数 */[root@rh2 ~]# grep shm /etc/fstab tmpfs                   /dev/shm                tmpfs   defaults        0 0/* 修改后的shm装载参数 */[root@rh2 ~]# grep shm /etc/fstab tmpfs                   /dev/shm                tmpfs   rw,size=4000m   0 0

转载地址:http://icsei.baihongyu.com/

你可能感兴趣的文章
端口状态说明 LISTENING、ESTABLISHED、TIME_WAIT及CLOSE_WAIT
查看>>
阿里云---阿里云服务器ECS开放8080端口
查看>>
Linux如何查看端口状态
查看>>
3种关闭linux系统端口方法
查看>>
pm2常用的命令用法介绍
查看>>
http状态码301和302详解及区别——辛酸的探索之路
查看>>
强大的原生DOM选择器querySelector和querySelectorAll
查看>>
clientWidth offsetWidth innerWidth 区别(窗口尺寸 汇总)
查看>>
【HTTP】Fiddler(一) - Fiddler简介
查看>>
Fiddler实现手机抓包——小白入门
查看>>
Fiddler屏蔽某些url的抓取方法
查看>>
浅析CSS中的overflow属性
查看>>
浅析HTML <label> 标签的 for 属性
查看>>
H5使用Selectors API简化选取操作
查看>>
记录我人生新的开始
查看>>
关于System.arraycopy方法的使用
查看>>
java基本概念(一)
查看>>
java基本概念(二)
查看>>
简易的ATM机
查看>>
旧版本的ATM
查看>>