ITPub博客

首页 > 数据库 > Oracle > Oracle 使用大内存出现:ORA-27102

Oracle 使用大内存出现:ORA-27102

原创 Oracle 作者:luckyfriends 时间:2014-03-06 10:56:07 0 删除 编辑

文章版权所有Jusin Haoluckyfriends),支持原创,转载请注明。

1.1. Oracle 使用大内存出现:ORA-27102

1.1.1. 问题现象:

发现其sga太小:

SQL> show parameter sga

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

lock_sga boolean FALSE

pre_page_sga boolean FALSE

sga_max_size big integer 2G

sga_target big integer 2G

SQL> show parameter spfile;

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

spfile string /u01/app/oracle/product/10.2.0/db_1/dbs/spfileorcl.ora

SQL> create pfile='/u01/app/oracle/initorcl20100705.ora' from spfile;

Done

SQL> alter system set sga_max_size=14G scope=spfile;

System altered

SQL> alter system set sga_target=14G scope=spfile;

System altered

SQL> alter system set optimizer_index_cost_adj=40;

SQL> alter system set optimizer_dynamic_sampling=4;

SQL>

重启数据库报错:

SQL> startup

ORA-27102: out of memory

Linux-x86_64 Error: 28: No space left on device

1.1.2. 解决方法:

检查操作系统参数:

[root@ncdb Server]# sysctl -a |grep sem

kernel.sem = 250 32000 32 128

[root@ncdb Server]# sysctl -a |grep file-max

fs.file-max = 697584

[root@ncdb Server]# sysctl -a |grep ip_local

net.ipv4.ip_local_reserved_ports =

net.ipv4.ip_local_port_range = 32768 61000

[root@ncdb Server]# sysctl -a|grep rmem_default

net.core.rmem_default = 129024

[root@ncdb Server]# sysctl -a|grep wmem_default

net.core.wmem_default = 129024

[root@ncdb Server]# sysctl -a|grep rmem_max

net.core.rmem_max = 131071

[root@ncdb Server]# vi /etc/sysctl.conf

# Controls the maximum size of a message, in bytes

kernel.msgmnb = 65536

# Controls the default maxmimum size of a mesage queue

kernel.msgmax = 65536

# Controls the maximum shared segment size, in bytes

kernel.shmmax = 68719476736

# Controls the maximum number of shared memory segments, in pages

kernel.shmall = 268435456

kernel.shmmni = 4096

# semaphores: semmsl, semmns, semopm, semmni

kernel.sem = 250 32000 100 128

fs.file-max = 697584

net.ipv4.ip_local_port_range = 1024 65000

net.core.rmem_default=1048576

net.core.rmem_max=1048576

net.core.wmem_default=1048576

net.core.wmem_max=262144

[root@ncdb Server]# sysctl -p

net.ipv4.ip_forward = 0

net.ipv4.conf.default.rp_filter = 1

net.ipv4.conf.default.accept_source_route = 0

kernel.sysrq = 0

kernel.core_uses_pid = 1

net.ipv4.tcp_syncookies = 1

kernel.msgmnb = 65536

kernel.msgmax = 65536

kernel.shmmax = 68719476736

kernel.shmall = 268435456

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

fs.file-max = 697584

net.ipv4.ip_local_port_range = 1024 65000

net.core.rmem_default = 1048576

net.core.rmem_max = 1048576

net.core.wmem_default = 1048576

net.core.wmem_max = 262144

接着启动可以正常启动数据库

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

请登录后发表评论 登录
全部评论
个人博客网 www.leosunny 长期从事数据库相关工作,涉及oracle,mysql, sqlsever,db2 , OGG, SSIS以及非关系数据库和大数据平台等。 希望一直分享一些个人案例和知识,和广大技术宅们共同进步。

注册时间:2009-06-06

  • 博文量
    468
  • 访问量
    3161286