博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ORA-27102:out of memory Linux-x86_64 Error: 12: Cannot allocate memory的处理
阅读量:2437 次
发布时间:2019-05-10

本文共 3762 字,大约阅读时间需要 12 分钟。

客户的oracle数据库启动报错,操作linux,oracle 11g由于将lock_sga参数设置为true当重启数据库时报错ORA-27102: out of memory

SQL> startup nomount

ORA-27102: out of memory
Linux-x86_64 Error: 12: Cannot allocate memory

原因是因为操作参数没有设置为允许sga所指定大小的内存可以被锁定

[root@jyrac1 ~]# ulimit -acore file size          (blocks, -c) 0data seg size           (kbytes, -d) unlimitedscheduling priority             (-e) 0file size               (blocks, -f) unlimitedpending signals                 (-i) 16384max locked memory       (kbytes, -l) 32max memory size         (kbytes, -m) unlimitedopen files                      (-n) 1024pipe size            (512 bytes, -p) 8POSIX message queues     (bytes, -q) 819200real-time priority              (-r) 0stack size              (kbytes, -s) 10240cpu time               (seconds, -t) unlimitedmax user processes              (-u) 16384virtual memory          (kbytes, -v) unlimitedfile locks                      (-x) unlimited

解决方法有两种

一:ulimit -l unlimited 在启动实例之前执行只对当前会话有效

[root@jyrac1 ~]# ulimit -l unlimited[root@jyrac1 ~]# su - oracle[oracle@jyrac1 ~]$ ulimit -acore file size          (blocks, -c) 0data seg size           (kbytes, -d) unlimitedscheduling priority             (-e) 0file size               (blocks, -f) unlimitedpending signals                 (-i) 16384max locked memory       (kbytes, -l) unlimitedmax memory size         (kbytes, -m) unlimitedopen files                      (-n) 65536pipe size            (512 bytes, -p) 8POSIX message queues     (bytes, -q) 819200real-time priority              (-r) 0stack size              (kbytes, -s) 10240cpu time               (seconds, -t) unlimitedmax user processes              (-u) 16384virtual memory          (kbytes, -v) unlimitedfile locks                      (-x) unlimited
[oracle@jyrac1 ~]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Fri Jun 6 12:20:26 2014Copyright (c) 1982, 2009, Oracle.  All rights reserved.Connected to an idle instance.SQL> startup nomountORACLE instance started.Total System Global Area  313159680 bytesFixed Size                  2212936 bytesVariable Size             109054904 bytesDatabase Buffers          197132288 bytesRedo Buffers                4759552 bytesSQL> show parameter lock_sgaNAME                                 TYPE                    VALUE------------------------------------ ----------------------  ------------------------------lock_sga                             boolean                 TRUE

二:修改/etc/security/limits.conf加入以下信息

oracle soft memlock 10485760
orcale hard memlock 10485760
允许锁定10G的内存

SQL> startup nomountORACLE instance started.Total System Global Area  730714112 bytesFixed Size                  2216944 bytesVariable Size             524291088 bytesDatabase Buffers          197132288 bytesRedo Buffers                7073792 bytes

还有lock_sga参数设置为true是不能启用自动内存管理的

SQL> show parameter memoryNAME                                 TYPE                      VALUE------------------------------------ ----------------------    ------------------------------hi_shared_memory_address             integer                   0memory_max_target                    big integer               0memory_target                        big integer               0shared_memory_address                integer                   0SQL> alter system set memory_max_target=700M scope=spfile;System altered.SQL> alter system set memory_target=600M scope=spfile;System altered.SQL> shutdown immediateORA-01507: database not mountedORACLE instance shut down.SQL> startup nomountORA-00847: MEMORY_TARGET/MEMORY_MAX_TARGET and LOCK_SGA cannot be set together

说明lock_sga参数设置为true时是不能启用自动内存管理的

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

转载于:http://blog.itpub.net/26015009/viewspace-1176889/

你可能感兴趣的文章
PG 函数的易变性(Function Volatility Categories)
查看>>
Lisp Quote 和Backquote分析
查看>>
PG psql 变彩色显示
查看>>
SICP 练习 1.3
查看>>
pg 数据库HA 启动脚本的两个假设
查看>>
PG9.2.3 发布
查看>>
sql_log_bin在GTID复制下的一个现象
查看>>
双主+haproxy手工切换的一个注意点
查看>>
利用binlog2sql实现闪回
查看>>
mongos分片集群下db数量过多导致服务不可用
查看>>
mysql唯一索引的一个小常识--Duplicate entry 'XXX' for key 'XXX'
查看>>
故障处理--mongos count不准
查看>>
大量短连接导致haproxy服务器端口耗尽
查看>>
mongo3.0.9库命名的一个S级bug
查看>>
跨版本导入数据导致mysqld崩溃
查看>>
xtrabackup对于flush tables with read lock操作的设置
查看>>
Gone away故障原因排查
查看>>
Server has authorization schema version 3,but found a schema version 1 user
查看>>
WebSphere的池设置——线程池、连接池
查看>>
caffe-ssd调试问题总结
查看>>