免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1331 | 回复: 0
打印 上一主题 下一主题

ORA-27102 问题解决 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-12-22 08:54 |只看该作者 |倒序浏览
   今天上午有一个数据库恢复的工作,目的是要把预生产库的数据库恢复到生产库去。用的是ASM,磁盘组,参数文件什么都创建好了,尝试启动instance,却发现instance启动不了。 
 
SQL*Plus: Release 11.2.0.1.0 Production on Thu Aug 4 22:25:08 2011
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup nomount;
ORA-27102: out of memory
Linux-x86_64 Error: 28: No space left on device
SQL> exit
 
  首先想到是内存不足了,于是用free查看,发现空闲的内存只有876mb , 而大部份内存是被cache了 。
root@hostname:~#free -m
             total       used       free     shared    buffers     cached
Mem:         32055      31179        876          0        443      25223
-/+ buffers/cache:       5513      26542
Swap:         8191        316       7875
  尝试释放cache里的内存:
 
root@hostname:~#sync
root@hostname:~#echo 3 > /proc/sys/vm/drop_caches
root@hostname:~#free -m
             total       used       free     shared    buffers     cached
Mem:         32055       8325      23730          0          1       4214
-/+ buffers/cache:       4108      27947
Swap:         8191        316       7875
 
 比较释放前后的值,可以发现已经有近20G内存释放了。重新启动instance,发现仍然不能启动。
 
SQL*Plus: Release 11.2.0.1.0 Production on Thu Aug 4 22:25:08 2011
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup nomount;
ORA-27102: out of memory
Linux-x86_64 Error: 28: No space left on device
SQL> exit
 
 
 先把/proc/sys/vm/drop_caches改回默认值再说:
root@hostname:~#echo 0 > /proc/sys/vm/drop_caches
 
 又想到linux里的核心参数,于是参考了预生产库的的参数配置:
# Oracle Kernal Parameters
#kernel.shmall = 2097152
#kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 256 96000 100 1024
fs.file-max = 6553600
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 4194304
kernel.msgmni = 2878

 但发现参数文件设定的值和系统的实际完全不一样 :
hostname:elcaro:$ cat /proc/sys/kernel/shmall
4294967296
hostname:elcaro:$ cat /proc/sys/kernel/shmmax
68719476736
 
 于是将生产库的核心参数改为和预生产库一样,问题解决:
#Oracle Kernal Parameters
#kernel.shmall = 2097152
kernel.shmall = 4294967296
#kernel.shmmax = 2147483648
kernel.shmmax = 68719476736
kernel.shmmni = 4096
#kernel.sem = 256 32000 100 142
kernel.sem = 256 96000 100 1024
fs.file-max = 6553600
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
"/etc/sysctl.conf" 70L, 2012C written

root@hostname:~#sysctl -p
net.ipv4.tcp_max_syn_backlog = 8192
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.ip_forward = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.icmp_ignore_bogus_error_responses = 1
net.ipv4.conf.all.rp_filter = 1
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.core_pattern = /var/core/core_%e_%p
kernel.shmall = 4294967296
kernel.shmmax = 68719476736
kernel.shmmni = 4096
kernel.sem = 256 96000 100 1024
fs.file-max = 6553600
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 4194304
kernel.msgmni = 2878
root@hostname:~#exit
logout
hostname:elcaro:$ dbi si
SQL*Plus: Release 11.2.0.1.0 Production on Thu Aug 4 23:33:13 2011
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 4275781632 bytes
Fixed Size                  2220200 bytes
Variable Size             905973592 bytes
Database Buffers         3355443200 bytes
Redo Buffers               12144640 bytes
SQL> exit

 
 关于free 和 /proc/sys/vm/drop_caches ,可参考:
     
 
 
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP