Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2454796
  • 博文数量: 328
  • 博客积分: 4302
  • 博客等级: 上校
  • 技术积分: 5486
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-01 11:14
个人简介

悲剧,绝对的悲剧,悲剧中的悲剧。

文章分类

全部博文(328)

文章存档

2017年(6)

2016年(18)

2015年(28)

2014年(73)

2013年(62)

2012年(58)

2011年(55)

2010年(28)

分类: Oracle

2014-12-11 15:57:12

一直对于ORACLE 11g在Solaris系统上的安装文档的系统参数设置这一部分不太了解,直到出现了这个问题:
ORA-27102: out of memory

查询了系统的空闲内存,发现还有很多,十来个G。同时把DB的最大内存改小为4G,还是同样的错误,怎么会out of memory 呢?

最后发现是系统参数 max-shm-memory 的问题。个人理解如下,这个参数规定了某个工程对应的用户,所有能够使用的内存界限。比如,我这里的oracle 用户所在的project名为oracle,其参数值是3G,那么oracle用户就只能使用3G的内存,如果要启动一个4G的instance,就会失败。如果理解不对,请指正。

解决方法很简单,把这个参数调大就OK了。

节选:

Set Kernel Parameters

The Oracle 11gR2 installation requires Solaris 10 U6 or later. Check the version and update level using the following command.

# cat /etc/release
                    Oracle Solaris 10 9/10 s10x_u9wos_14a X86
     Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
                            Assembled 11 August 2010
#

As the root user, issue the following command.

projadd oracle

Append the following line to the "/etc/user_attr" file.

oracle::::project=oracle

If you've performed a default installation, it is likely that the only kernel parameter you need to alter is "max-shm-memory" to meet the minimum installation requirements. To check the current value issue the following command.

# prctl -n project.max-shm-memory -i project oracle
project: 100: oracle
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
project.max-shm-memory
        privileged       254MB      -   deny                                 -
        system          16.0EB    max   deny                                 -
#

To reset this value, make sure at least one session is logged in as the oracle user, then from the root user issue the following commands.

# prctl -n project.max-shm-memory -v 4gb -r -i project oracle
# projmod -s -K "project.max-shm-memory=(priv,4gb,deny)" oracle

The first dynamically resets the value, while the second makes changes to the "/etc/project" file so the value is persistent between reboots.

# cat /etc/project
system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
oracle:100::::project.max-shm-memory=(priv,4294967296,deny)
#

Add the following lines to the "/etc/inittab" file, immediately before the entry for "startd".

tm::sysinit:/usr/sbin/ndd -set /dev/tcp tcp_smallest_anon_port 9000 > /dev/console
tm::sysinit:/usr/sbin/ndd -set /dev/tcp tcp_largest_anon_port 65500 > /dev/console
tm::sysinit:/usr/sbin/ndd -set /dev/udp udp_smallest_anon_port 9000 > /dev/console
tm::sysinit:/usr/sbin/ndd -set /dev/udp udp_largest_anon_port 65500 > /dev/console

Append the following line to the "/etc/system" file.

set maxusers=4096

Reboot your system before attempting to install Oracle.

阅读(2658) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~