环境:
OS:RHEL 6.5
DB:oracle 10.2.0.1
ORA-27125: unable to create shared memory segment
Linux-x86_64 Error: 1: Operation not permitted
故障现象:
数据库无法正常启动
-
SQL> startup
-
ORA-27125: unable to create shared memory segment
-
Linux-x86_64 Error: 1: Operation not permitted
故障分析:
发现这和linux的hugepage有关,操作系统的版本是RHEL 6.5,可能在创建共享段时需要用到hugepage,有权限限制。
解决办法:
查看oracle的用户组:
-
[oracle@test ~]$ id
-
uid=501(oracle) gid=502(dba) groups=502(dba) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
用root执行下面的命令,将dba组添加到系统内核中
-
[root@test ~]# echo 502 > /proc/sys/vm/hugetlb_shm_group
再次启动数据库,启动正常。
-
[root@test ~]# su - oracle
-
[oracle@test ~]$ sqlplus / as sysdba
-
-
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Aug 11 21:16:32 2015
-
-
Copyright (c) 1982, 2005, Oracle. All rights reserved.
-
-
Connected to an idle instance.
-
-
SQL> startup
-
ORACLE instance started.
-
-
Total System Global Area 2097152000 bytes
-
Fixed Size 2022080 bytes
-
Variable Size 469763392 bytes
-
Database Buffers 1610612736 bytes
-
Redo Buffers 14753792 bytes
-
Database mounted.
-
Database opened.
上面的添加方法在重启操作系统后,此权限会消失,需要在/etc/sysctl.conf文件添加如下命令才能永久生效:
-
vm.hugetlb_shm_group = 502
(
502此数字为dba组的编号,可以使用id oracle命令查看)
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/205377/viewspace-1768768/
,如需转载,请注明出处,否则将追究法律责任。