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. 一.JDK版本切换批处理脚本

    我们平时在window上做开发的时候,可能需要同时开发两个甚至多个项目,有时不同的项目对JDK的版本要求有区别,这时候我们可能会在一台电脑上安装多个版本的JDK,如下图所示:

  2. gradle tool升级到3.0注意事项

    Gradle版本升级 其实当AS升级到3.0之后,Gradle Plugin和Gradle不升级也是可以继续使用的,但很多新的特性如:Java8支持.新的依赖匹配机制.AAPT2等新功能都无法正常使用 ...

  3. 你不知道的JavasScript上篇·第三章·对象

    1.Object.defineProperty()&&getter.setter Object.defineProperty(目标对象,属性名(string型),{ get:funct ...

  4. CSS 水平居中和垂直居中

    1.水平居中——行内元素 text-align: center; 2.水平居中——定宽块状元素 margin: auto,满足定宽和块状两个条件的元素是可以通过设置“左右margin”值为“auto” ...

  5. 前端开发面试题-JavaScript(转载)

    本文由 本文的原作者markyun 收集总结. 介绍js的基本数据类型. Undefined.Null.Boolean.Number.String. ECMAScript 2015 新增:Symbol ...

  6. SwipeRefreshLayout嵌套ScrollView实现下拉刷新

    API doc:http://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.html 首先须 ...

  7. 本地用maven搭建SpringMvc+redis集成

    ---恢复内容开始--- 首先本地需要搭建私服,简单说一下搭建私服的步骤 1.为什么使用Nexus 如果没有私服,我们所需的所有构件都需要通过maven的中央仓库和第三方的Maven仓库下载到本地,而 ...

  8. webpack+sass+vue 入门教程(三)

    十一.安装sass文件转换为css需要的相关依赖包 npm install --save-dev sass-loader style-loader css-loader loader的作用是辅助web ...

  9. 13 款惊艳的 Node.js 框架——第2部分

    [编者按]本文作者为 Peter Wayner,主要介绍13款至精至简的 Node.js 框架,帮助你简化高速网站.丰富 API 以及实时应用的开发流程.本文系国内 ITOM 管理平台 OneAPM ...

  10. 使用FireFox插件RESTClient、HttpRequester模拟http(get post)请求

    我们写好一个接口后,需要进行测试.有时我们会写一个html表单提交,无疑增加了工作量,尤其是当参数比较多或者传json或xml数据时,效率更是大大降低.我们可以使用基于FireFox的RESTClie ...