ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 数据库增加SGA,导致ORA-27102: out of memory错误

数据库增加SGA,导致ORA-27102: out of memory错误

原创 Linux操作系统 作者:yantaicuiwei 时间:2011-11-15 22:59:32 0 删除 编辑
LINUX:Red Hat Enterprise Linux AS release 4
oracle :10g

给数据库服务器增加内存,同时扩大SGA的大小,在数据库重新启动时,报如下错误:

sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Nov 15 22:15:50 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORA-27102: out of memory
Linux-x86_64 Error: 28: No space left on device

查询metalink ,文档解释如下

Upon startup of Linux database get ORA-27102: out of memory Linux-X86_64 Error: 28: No space left on device [ID 301830.1]


Applies to:

Oracle Server - Enterprise Edition - Version: 9.2.0.4 to 11.2.0.2 - Release: 9.2 to 11.2
Red Hat Enterprise Linux Advanced Server x86-64 (AMD Opteron Architecture)
x86 64 bit (for Enterprise Linux only)
SUSE / UnitedLinux x86-64

Symptoms

When trying to increase the SGA to approach half available RAM with an Oracle 64bit version on a Linux 64bit operating system, even though shmmax is set to match half the amount of RAM, you get the following error when trying to start the instance:

SQL> startup nomount 
ORA-27102: out of memory
Linux-x86_64 Error: 28: No space left on device

Changes

shmall is too small, most likely is set to the default setting of 2097152

$ cat /proc/sys/kernel/shmall
2097152

Cause

shmall is the total amount of shared memory, in pages, that the system can use at one time.

Solution

Set shmall equal to the sum of all the SGAs on the system, divided by the page size.

The page size can be determined using the following command:

$ getconf PAGE_SIZE 
4096

For example, if the sum of all the SGAs on the system is 16Gb and the result of '$ getconf PAGE_SIZE' is 4096 (4Kb) then set shmall to 4194304 pages

As the root user set the shmall to 4194304 in the /etc/sysctl.conf file:

kernel.shmall = 4194304

then run the following command:

# sysctl -p
# cat /proc/sys/kernel/shmall
4194304

NOTE:

The above command loads the new value and a reboot is not necessary

Switch back to being the oracle user and retry the startup command.


下回改内存的时候千万别忘了,修改系统内核参数!


kernel.shmall=4194304

kernel.shmmax=16861741056 --物理内存的一半


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/21601207/viewspace-711010/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-04-15

  • 博文量
    64
  • 访问量
    250172