ORA-27125: unable to create shared memory segment的解决方法(转)

  1. # Kernel sysctl configuration file for Red Hat Linux
  2. #
  3. # For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
  4. # sysctl.conf(5) for more details.
  5. # Controls IP packet forwarding
  6. net.ipv4.ip_forward = 0
  7. # Controls source route verification
  8. net.ipv4.conf.default.rp_filter = 1
  9. # Do not accept source routing
  10. net.ipv4.conf.default.accept_source_route = 0
  11. # Controls the System Request debugging functionality of the kernel
  12. kernel.sysrq = 0
  13. # Controls whether core dumps will append the PID to the core filename.
  14. # Useful for debugging multi-threaded applications.
  15. kernel.core_uses_pid = 1
  16. # Controls the use of TCP syncookies
  17. net.ipv4.tcp_syncookies = 1
  18. # Disable netfilter on bridges.
  19. net.bridge.bridge-nf-call-ip6tables = 0
  20. net.bridge.bridge-nf-call-iptables = 0
  21. net.bridge.bridge-nf-call-arptables = 0
  22. # Controls the default maxmimum size of a mesage queue
  23. kernel.msgmnb = 65536
  24. # Controls the maximum size of a message, in bytes
  25. kernel.msgmax = 65536
  26. # Controls the maximum shared segment size, in bytes
  27. kernel.shmmax = 68719476736
  28. # Controls the maximum number of shared memory segments, in pages
  29. kernel.shmall = 4294967296
  30. ###########oracle#################
  31. kernel.shmall = 2097152
  32. kernel.shmmax = 2147483648
  33. kernel.shmmni = 4096
  34. kernel.sem = 250 32000 100 128
  35. net.ipv4.ip_local_port_range = 1024 65000
  36. net.core.rmem_default = 4194304
  37. net.core.rmem_max = 4194304
  38. net.core.wmem_default = 262144
  39. net.core.wmem_max = 262144
  40. vm.hugetlb_shm_group = 501

上面是我的完整的 sysctl.conf文件

ORA-27125: unable to create shared memory segment的解决方法(转)

原文:http://www.eygle.com/rss/20111202.html 
http://www.itpub.net/thread-1739835-1-1.html

在某些操作系统上,当启动数据库或者创建数据库时都可能出现ORA-27125错误,我在Oracle Linux 6上安装Oracle 10.2.0.1,创建数据库时就遇到了这个错误。

这个错误的解决就是修改 /proc/sys/vm/hugetlb_shm_group 文件。
以下是老杨提到过的一个问题,解决方法相同:

帮客户解决一个Linux上数据库无法启动的问题。
客户的Linux 5.6 x86-64环境,安装数据库后,启动数据库报错:ORA-27125。
Oracle文档上关于ORA-27125错误的描述为:

ORA-27125: unable to create shared memory segment
Cause: shmget() call failed
Action: contact Oracle support

查询了一下,发现问题和linux上的hugetbl有关。
解决方法也很简单,首先检查oracle用户的组信息:

[oracle@yans1 ~]$ id oracle
uid=500(oracle) gid=502(oinstall) groups=502(oinstall),501(dba)
[oracle@yans1 ~]$ more /proc/sys/vm/hugetlb_shm_group
0

下面用root执行下面的命令,将dba组添加到系统内核中:
# echo 501 > /proc/sys/vm/hugetlb_shm_group

然后启动数据库,问题消失。

但以上这种方式在重启操作系统后失效, /proc/sys/vm/hugetlb_shm_group又变为了0,建议采用以下方式解决:

加入vm.hugetlb_shm_group = 501 到/etc/sysctl.conf中来解决:
# vi /etc/sysctl.conf
加入如下的内容,其中501为dba组号,需要根据你实际的情况进行改变。
vm.hugetlb_shm_group = 501
# sysctl -p

那么hugetlb_shm_group组是什么呢?以下是解释:
hugetlb_shm_group contains group id that is allowed to create SysV shared memory segment using hugetlb page

这里反复提到了HugePage,以下是关于HugePage的说明和解释:

When a process uses some memory, the CPU is marking the RAM as used by
that process. For efficiency, the CPU allocate RAM by chunks of 4K bytes
(it's the default value on many platforms). Those chunks are named
pages. Those pages can be swapped to disk, etc.

Since the process address space are virtual, the CPU and the
operating system have to remember which page belong to which process,
and where it is stored. Obviously, the more pages you have, the more
time it takes to find where the memory is mapped. When
a process uses 1GB of memory, that's 262144 entries to look up (1GB /
4K). If one Page Table Entry consume 8bytes, that's 2MB (262144 * 8) to
look-up.

Most current CPU architectures support bigger pages (so the CPU/OS have
less entries to look-up), those are named Huge pages (on Linux), Super
Pages (on BSD) or Large Pages (on Windows), but it all the same thing.

ORA-27125: unable to create shared memory segment的解决方法(转)的更多相关文章

  1. 【ORA】ORA-27125:unable to create shared memory segment

    在安装Oracle 10g的时候出现一个了错误,在网上总结了一下大牛写的文章 ORA-27125:unable to create shared memory segment 安装时出现这个错误安装会 ...

  2. ORA-27125: unable to create shared memory segment

    平台环境   :  Oracle Linux Server release 5.7 x86_64 数据库版本 :  Oracle Database 10g Enterprise Edition Rel ...

  3. RAC数据库的ORA-27123: Unable To Attach To Shared Memory Segment Linux-x86_64 Error: 22: Invalid argument

    RAC数据库的 ORA-27123: Unable To Attach To Shared Memory Segment Linux-x86_64 Error: 22: Invalid argumen ...

  4. shared memory segment exceeded your kernel's SHMMAX parameter

    http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server IpcMemoryCreate: shmget(key=5432001, s ...

  5. java.lang.OutOfMemoryError: unable to create new native thread如何解决

    工作中碰到过这个问题好几次了,觉得有必要总结一下,所以有了这篇文章,这篇文章分为三个部分:认识问题.分析问题.解决问题. 一.认识问题: 首先我们通过下面这个 测试程序 来认识这个问题:运行的环境 ( ...

  6. Xcode6 运行程序后,右侧Debug区域的Memory显示空白解决方法

    http://chenyh-blog.com/%E8%9B%8B%E7%96%BC%E7%9A%84%E5%86%85%E5%AD%98-%E7%AC%AC%E4%B8%89%E7%AF%87-sdw ...

  7. Unable to connect to your virtual device!解决方法

    使用Genymotion安卓模拟器的用户,很多朋友在启动安卓系统的时候就弹出了以下英文,不知道如何处理,今天电脑知识网小编来教您处理Genymotion安卓模拟器启动出错的问题. Error Unab ...

  8. 安装tensorflow报ImportError: libcublas.so.9.0: cannot open shared object file的解决方法【转】

    本文转载自:https://blog.csdn.net/qq_37274615/article/details/81099738 转载自:https://blog.csdn.net/qysh123/a ...

  9. mysql错误:Can’t create TCP/IP socket (10106) 解决方法

    错误描述 “mysql错误:Can’t create TCP/IP socket (10106)”,目测是socket端口被占用的原因,然后在打开tomcat,报的错误中也包含了“socket”,再一 ...

随机推荐

  1. [javaSE] 看知乎学习反射

    简单的来说,反射机制指的是程序在运行时能够获取自身的信息.在java中,只要给定类的名字,那么就可以通过反射机制来获得类的所有信息. 知乎:学习java应该如何理解反射?   余晖: 反射提供了一种运 ...

  2. SWT table性能改善 -- 使用VirtualTable

    在SWT程序中使用table展示数据时,如果数据过多,执行起来会比较慢,不过,我们可以借助VirtualTable来解决这一问题. Eclipse官网中关于VirtualTable的说明见:http: ...

  3. Oracle总结之plsql编程(基础八)

    原创作品,转自请注明出处:https://www.cnblogs.com/sunshine5683/p/10328524.html 一.函数 1.函数是可以返回一个特定的数据,函数的创建中必须包含re ...

  4. Linux服务器开启ssh服务,实现ssh远程登陆!

    最近在学linux,使用ssh远程登陆linux,记录下来! 首先进入/etc目录下,/etc目录存放的是一些配置文件,比如passwd等配置文件,要想使用ssh远程登陆,需要配置/etc/ssh/s ...

  5. 关于在JSP页面用c标签写if语句

    2017年5月28日,晴,心情还不错. 昨晚和同事撸串,回来后继续威士忌走起,喝到凌晨2点多,聊的甚欢.彼此分享了很多自己成长过程中的故事,相互之间有了进一步的了解,友情又进了一步.在以后的时光里,愿 ...

  6. 怎么给SharePoint得视图设置多个过滤条件? How to set multiple complex filter conditions to the SharePoint list view ?

    平时会很容易遇到需要给视图设置复杂得过滤条件,如果是一两个条件还好多,如果条件超过四个,会比较麻烦,很容易会出现逻辑不清,或者没有按照你得意愿来过滤数据得问题. 解决方案: 设置计算列,calcula ...

  7. 语义SLAM的数据关联和语义定位(一)

    语义SLAM和多传感器融合是自动驾驶建图和定位部分比较热门的两种技术.语义SLAM中,语义信息的数据关联相较于特征点的数据关联有所不同.我们一般用特征描述子的相似性来匹配和关联不同图像中的特征点.特征 ...

  8. HttpWatch HttpWatch时间表(HttpWatch Time Charts)

    HttpWatch时间表(HttpWatch Time Charts) by:授客 QQ:1033553122 截图 说明 页面事件线(Page Event Lines)

  9. 新知食APP架构分析--北京识物科技有限公司旗下产品

    俗话说不打无准备之仗,这次真是有点懵逼了,建议大家去面试的时候,尤其是去小型互联网公司的时候,如果你想比其他人有竞争力,那么你要研究一下当前他的公司正在开发产品,他们的业务类型是什么样的,比如他们公司 ...

  10. Linux 下解压 rar 文件

    网上下载rar 压缩文件的使用,在linux在我们需要对其进行解压缩,这个时候,我们需要安装 rar相关的文件,来进行解压缩. 1. 下载 我们进入rarlab网站,进行下载 rar for linu ...