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

php中文网
发布: 2016-06-07 16:49:44
原创
3523人浏览过

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

客户的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 -a
core file size          (blocks, -c) 0
data seg size          (kbytes, -d) unlimited
scheduling priority            (-e) 0
file size              (blocks, -f) unlimited
pending signals                (-i) 16384
max locked memory      (kbytes, -l) 32
max memory size        (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues    (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time              (seconds, -t) unlimited
max user processes              (-u) 16384
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
 
解决方法有两种
 一:ulimit -l unlimited 在启动实例之前执行只对当前会话有效
[root@jyrac1 ~]# ulimit -l unlimited

[root@jyrac1 ~]# su - oracle
[oracle@jyrac1 ~]$ ulimit -a
core file size          (blocks, -c) 0
data seg size          (kbytes, -d) unlimited
scheduling priority            (-e) 0
file size              (blocks, -f) unlimited
pending signals                (-i) 16384
max locked memory      (kbytes, -l) unlimited
max memory size        (kbytes, -m) unlimited
open files                      (-n) 65536
pipe size            (512 bytes, -p) 8
POSIX message queues    (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time              (seconds, -t) unlimited
max user processes              (-u) 16384
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
 [oracle@jyrac1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri Jun 6 12:20:26 2014

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

Connected to an idle instance.

SQL> startup nomount
ORACLE instance started.

Total System Global Area  313159680 bytes
Fixed Size                  2212936 bytes
Variable Size            109054904 bytes
Database Buffers          197132288 bytes
Redo Buffers                4759552 bytes

SQL> show parameter lock_sga

NAME                                TYPE                    VALUE
------------------------------------ ----------------------  ------------------------------
lock_sga                            boolean                TRUE

--------------------------------------分割线 --------------------------------------

在CentOS 6.4下安装Oracle 11gR2(x64)

Oracle 11gR2 在VMWare虚拟机中安装步骤

Debian 下 安装 Oracle 11g XE R2

--------------------------------------分割线 --------------------------------------

二:修改/etc/security/limits.conf加入以下信息
 oracle soft memlock 10485760
 orcale hard memlock 10485760
 允许锁定10G的内存
SQL> startup nomount
ORACLE instance started.

Total System Global Area  730714112 bytes
Fixed Size                  2216944 bytes
Variable Size            524291088 bytes
Database Buffers          197132288 bytes
Redo Buffers                7073792 bytes
 
还有lock_sga参数设置为true是不能启用自动内存管理的
SQL> show parameter memory

最佳 Windows 性能的顶级免费优化软件
最佳 Windows 性能的顶级免费优化软件

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号