ORA-00845 : MEMORY_TARGET not supported on this system(调大数据库内存无法启动)
Posted 张冲andy
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ORA-00845 : MEMORY_TARGET not supported on this system(调大数据库内存无法启动)相关的知识,希望对你有一定的参考价值。
问题描述:调大数据库内存后,启动数据库报 ORA-00845 : MEMORY_TARGET not supported on this system 。
-- 调大数据库内存后,数据库启动报错
[[email protected] bin]# ./srvctl start database -d jcdydb
PRCR-1079 : Failed to start resource ora.jcdydb.db
CRS-5017: The resource action "ora.jcdydb.db start" encountered the following error:
ORA-00845: MEMORY_TARGET not supported on this system
. For details refer to "(:CLSN00107:)" in "/oracle/app/11.2.0/grid/log/jcdydb1/agent/crsd/oraagent_oracle//oraagent_oracle.log".
CRS-5017: The resource action "ora.jcdydb.db start" encountered the following error:
ORA-00845: MEMORY_TARGET not supported on this system
. For details refer to "(:CLSN00107:)" in "/oracle/app/11.2.0/grid/log/jcdydb2/agent/crsd/oraagent_oracle//oraagent_oracle.log".
CRS-2674: Start of ‘ora.jcdydb.db‘ on ‘jcdydb1‘ failed
CRS-2674: Start of ‘ora.jcdydb.db‘ on ‘jcdydb2‘ failed
CRS-2632: There are no more servers to try to place resource ‘ora.jcdydb.db‘ on that would satisfy its placement policy
-- 查看服务器内存,132103588k /1024/1024 = 125G
top - 19:32:11 up 7:21, 7 users, load average: 1.13, 1.16, 1.16
Tasks: 2089 total, 1 running, 2088 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.3%us, 0.5%sy, 0.0%ni, 99.2%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 132103588k total, 31130024k used, 100973564k free, 216416k buffers
Swap: 67108856k total, 0k used, 67108856k free, 26919636k cached
-- 查看针对数据库的内核参数,发现没有问题
[[email protected] bin]# cat /etc/sysctl.conf
#add for oracle 11gR2 rac
kernel.shmmni = 4096
kernel.shmmax = 277439000000
kernel.shmall = 4294967296
kernel.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.default.rp_filter = 2
net.ipv4.conf.all.rp_filter = 2
kernel.sem = 3010 427420 3010 142
[[email protected] bin]#
说明:
kernel.shmmax 共享内存段的大小,设置大小超过SGA大小才不不会造成性能问题。
kernel.shmall 共享内存页总数,设置大小为物理理内存大小/内存页大小。
通过getconf命令来获取内存页大小:
[[email protected] ~ ]# getconf PAGE_SIZE
4096
[[email protected] ~ ]# getconf PAGE_SIZE
4096
-- 查看 /dev/shm 大小, 发现只有内存的一半,小于数据库内存为服务器内存的80%,不符合要求。
[[email protected] bin]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/osvg-lv_root
99G 488M 93G 1% /
/dev/sda1 504M 45M 434M 10% /boot
/dev/mapper/osvg-lv_data
50G 3.7G 44G 8% /data
/dev/mapper/osvg-lv_home
9.9G 3.9G 5.5G 42% /home
/dev/mapper/osvg-lv_ora
99G 12G 82G 13% /oracle
/dev/mapper/osvg-lv_tmp
32G 9.5G 21G 32% /tmp
/dev/mapper/osvg-lv_usr
20G 7.4G 12G 40% /usr
/dev/mapper/osvg-lv_var
9.9G 508M 8.9G 6% /var
/data/soft/rhel-server-6.4-x86_64-dvd.iso
3.5G 3.5G 0 100% /media/rhel64
tmpfs 62G 0G 65G 0% /dev/shm
说明:/dev/shm的容量默认最大为内存的一半大小,使用df -h命令可以看到。但它并不会真正的占用这块内存,
如果/dev/shm/下没有任何文件,它占用的内存实际上就是0字节。
-- 查看 /dev/shm 被谁占用,快速加大 /dev/shm ,确认无重要进程使用/dev/shm后,需要 kill 文件使用者。
[[email protected] bin]# lsof /dev/shm
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
pulseaudi 27716 grid mem REG 0,16 67108904 11057360 /dev/shm/pulse-shm-863193574
gnome-ter 42214 grid mem REG 0,16 67108904 11057310 /dev/shm/pulse-shm-3660319902
[[email protected] bin]# kill -9 27716 42214
-- 再次查看,发现无占用。
[[email protected] bin]# lsof /dev/shm
[[email protected] bin]#
-- umount /dev/shm
[[email protected] bin]# umount /dev/shm
-- 编辑 /etc/fstab , 加大 /dev/shm 。
[[email protected] bin]# vi /etc/fstab 修改
tmpfs /dev/shm tmpfs defaults,size=110G 0 0
[[email protected] bin]# mount /dev/shm
-- 查看 /dev/shm 大小。
[[email protected] bin]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/osvg-lv_root
99G 488M 93G 1% /
/dev/sda1 504M 45M 434M 10% /boot
/dev/mapper/osvg-lv_data
50G 3.7G 44G 8% /data
/dev/mapper/osvg-lv_home
9.9G 3.9G 5.5G 42% /home
/dev/mapper/osvg-lv_ora
99G 12G 82G 13% /oracle
/dev/mapper/osvg-lv_tmp
32G 9.5G 21G 32% /tmp
/dev/mapper/osvg-lv_usr
20G 7.4G 12G 40% /usr
/dev/mapper/osvg-lv_var
9.9G 508M 8.9G 6% /var
/data/soft/rhel-server-6.4-x86_64-dvd.iso
3.5G 3.5G 0 100% /media/rhel64
tmpfs 110G 0 110G 0% /dev/shm
--启动数据库。
[[email protected] bin]# ./srvctl start database -d jcdydb >成功!
以上是关于ORA-00845 : MEMORY_TARGET not supported on this system(调大数据库内存无法启动)的主要内容,如果未能解决你的问题,请参考以下文章
ORA-00845: MEMORY_TARGET not supported on this system
ORA-00845: MEMORY_TARGET not supported on this system
ORA-00845: MEMORY_TARGET not supported on this system
ORA-00845: MEMORY_TARGET not supported