Oracle 10g ORA-27125 unable to create shared memory segment 故障解决方法
作者:
dave
从Windows 下的一个虚拟机复制到linux 环境后启动虚拟机中的数据库报如下错误:
[oracle@dave admin]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.1.0 - Production on Mon Mar 21 21:03:47 2016 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to an idle instance. SQL> startup ORA-27125: unable to create shared memory segment Linux-x86_64 Error: 1: Operation not permitted SQL> exit Disconnected [oracle@dave ~]$ oerr ora 27125 27125, 00000, "unable to create shared memory segment" // *Cause: shmget() call failed // *Action: contact Oracle support [oracle@dave ~]$
--操作系统版本:
[oracle@dave ~]$ lsb_release -a LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID: RedHatEnterpriseServer Description: Red Hat Enterprise Linux Server release 6.3 (Santiago) Release: 6.3 Codename: Santiago
解决方法:
[oracle@dave admin]$ id oracle uid=505(oracle) gid=505(oinstall) groups=505(oinstall),506(dba) [oracle@dave admin]$ more /proc/sys/vm/hugetlb_shm_group 0 [oracle@dave admin]$ exit Logout
将dba 组对应的id 加入/proc/sys/vm/hugetlb_shm_group文件:
[root@dave ~]# echo 506 >/proc/sys/vm/hugetlb_shm_group [root@dave ~]# su - oracle [oracle@dave ~]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.1.0 - Production on Mon Mar 21 21:05:54 2016 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 432013312 bytes Fixed Size 2021344 bytes Variable Size 130025504 bytes Database Buffers 297795584 bytes Redo Buffers 2170880 bytes Database mounted. Database opened. SQL> select * from v$version; BANNER -------------------------------------------------------------------------------- Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi PL/SQL Release 10.2.0.1.0 - Production CORE 10.2.0.1.0 Production TNS for Linux: Version 10.2.0.1.0 - Production NLSRTL Version 10.2.0.1.0 - Production SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production With the Partitioning, OLAP and Data Mining options
成功启动。
但采用该方法的不足就是OS重启之后,就失效了。 终极的解决方法是就是写入到配置文件。
修改/etc/sysctl.conf 文件,如下:
[root@dave ~]# echo 'vm.hugetlb_shm_group = 506' > /etc/sysctl.conf [root@dave ~]# sysctl -p vm.hugetlb_shm_group = 506
版权声明:本文为博主原创文章,未经博主允许不得转载。
oracle 故障处理