ORA-27125: unable to create shared memory segment
2014-04-10 22:38 潇湘隐者 阅读(11605) 评论(2) 编辑 收藏 举报案例环境:
操作系统环境 : Oracle Linux Server release 5.7 x86_64
数据库版本 : Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
在安装Oracle安装过程中,dbca 建instance的,遇到如下错误:ORA-27125: unable to create shared memory segment
分析解决:
以前遇到安装ORACLE成功后,启动过程中遇到ORA-27125错误, 也在博客ORA-27125: unable to create shared memory segment和博客ORA-27125里面记录过,于是按照解决方法做了如下操作:
1: [root@DB-Server cdrom]# id oracle
2:
3: uid=502(oracle) gid=502(oinstall) groups=502(oinstall),503(dba)
4:
5: [root@DB-Server cdrom]# more /proc/sys/vm/hugetlb_shm_group
6:
7: 0
8:
9: [root@DB-Server cdrom]# echo 502 >/proc/sys/vm/hugetlb_shm_group
10:
11: [root@DB-Server cdrom]#
然后在/etc/sysctl.conf 里面添加参数vm.hugetlb_shm_group = 502,就可以在下次启动时不报ORA-27125错误。
事后跟老大聊了一下这个错误,老大说他以前也使用这个版本的操作系统和数据库安装镜像(我们使用同样的操作系统、数据库安装镜像文件),但是没有遇到过这类问题。我也看过eygel的博客http://www.eygle.com/archives/2011/12/hugepageshugetl.html 以及David的博客http://blog.csdn.net/tianlesoftware/article/details/7309046,基本上都是涉及hugetlb_shm_group,经过一番探索,老大发了Metalink上的一个链接给我:https://support.oracle.com/epmos/faces/BugDisplay?_afrLoop=446607573886554&id=4726024&_afrWindowMode=0&_adf.ctrl-state=k6an80rhq_4 如下所示:
Hdr: 4726024 10.2.0.1 RDBMS 10.2.0.1 OSD PRODID-5 PORTID-226 ORA-27125
Abstract: GETTING ORA-27125 WHEN TRYING TO STARTUP INSTANCE
*** 11/08/05 06:47 pm ***
TAR:
----
15683356.6
PROBLEM:
--------
Customer installed 10.2.0.1 on SuSe SLES9
Get the following error when trying to startup instance either using sqlplus or dbca
ORA-27125 unable to create shared memory segment
Linux-86_64 Error: 1 Operation not permitted
DIAGNOSTIC ANALYSIS:
--------------------
Looks like customer is runinng into bug Bug 3681720. This bug is closed as
dup of 3520770 which indicated problem is fixed in 10.2.
But customer is still encountering this error.
WORKAROUND:
-----------
Set disable_cap_mlock to 1
$ echo 1 > /proc/sys/vm/disable_cap_mlock
RELATED BUGS:
-------------
3681720
3520770
REPRODUCIBILITY:
----------------
TEST CASE:
----------
STACK TRACE:
------------
SUPPORTING INFORMATION:
-----------------------
24 HOUR CONTACT INFORMATION FOR P1 BUGS:
----------------------------------------
DIAL-IN INFORMATION:
--------------------
IMPACT DATE:
------------
*** 11/08/05 06:47 pm *** (CHG: Sta->16)
*** 11/08/05 07:04 pm ***
*** 11/09/05 03:54 am ***
*** 11/09/05 03:54 am ***
*** 11/09/05 05:36 am ***
*** 11/09/05 05:52 am ***
*** 11/09/05 06:59 am ***
*** 11/10/05 08:09 am ***
*** 11/10/05 08:36 am *** (CHG: Sta->10)
*** 11/10/05 08:36 am ***
*** 11/10/05 11:33 am *** (CHG: Sta->16)
*** 11/10/05 11:33 am ***
*** 11/11/05 03:57 am ***
*** 11/11/05 05:25 am ***
*** 11/11/05 05:38 am *** (CHG: Sta->45)
*** 11/11/05 05:38 am ***
*** 02/05/07 04:09 am *** (CHG: Sta->95)
于是我打上10.0.2.4.0的补丁后。然后在/etc/sysctl.conf 将参数vm.hugetlb_shm_group = 502注释后,重新关闭、启动数据库,测试结果显示,ORA-27125错误不见了。显然这是在Linux x86-64平台上,ORACLE 10.2.0.1的一个Bug来的。至于老大为什么没有碰到这个错误,他解释是安装完成后,直接打补丁升级,然后启动数据库。但是很奇怪安装过程中也没有碰到这个错误,而我就多次碰到了。