平台环境:Linux Red Hat Enterprise Linux Server release 6.0 (Santiago)
数据库版本:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
安装好ORALCE数据库后,启动数据库就会报如下错误
当启动数据库或者创建数据库时都可能出现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
然后启动数据库,问题消失。
那么hugetlb_shm_group组是什么呢?以下是解释:
hugetlb_shm_group contains group id that is allowed to create SysV shared memory segment using hugetlb page
另在安装过程中遇到的操作系统验证错误,可以通过如下方式解决:
在Linux系统中安装oralce的过程中,如果Linux发行版本不是oracle的推荐版本,可能会报如下错误,导致runInstaller无法完成:
Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
Failed <<<<
遇到这个问题,可以通过如下三种方式解决
1、修改Linux的发行标记
如在redhat-5上安装oracle的时候,需要将文件 '/etc/redhat-release'的内容由
Red Hat Enterprise Linux Server release 5 (Tikanga)
修改为Oracle支持的版本
Red Hat Enterprise Linux Server release 4 (Tikanga)
2、runInstaller的时候加上-ignoreSysPreReqs参数,如:
./runInstaller -ignoreSysPreReqs
3.修改oraparam.ini的参数
增加你的系统版本号
4.设置数据库
[root@DB-Server ~]#id oracle
uid=501(oracle) gid=502(oinstall) groups=502(oinstall),501(dba)
[root@DB-Server ~]#echo 501 > /proc/sys/vm/hugetlb_shm_group
然后重启数据库,问题解决,但是我发现数据库服务器重启后,这个问题又会重现,又必须处理上述命令,才能成功启动数据库。治标不治本
参考http://wiki.debian.org/Hugepages后,其实只须在/etc/sysctl.conf下设置一下 hugetlb_shm_group即可一劳永逸的解决这个问题:
Create a group for users of hugepages, and retrieve it's GID (is this example, 2021) then add yourself to the group.
Note: this should not be needed for libvirt (see /etc/libvirt/qemu.conf)
% groupadd my-hugetlbfs
% getent group my-hugetlbfs
my-hugetlbfs:x:2021:
% adduser franklin my-hugetlbfs
Adding user `franklin' to group `my-hugetlbfs' ...
Adding user franklin to group my-hugetlbfs
Done.Edit /etc/sysctl.conf and add this text to specify the number of pages you want to reserve (see pages-size)
# Allocate 256*2MiB for HugePageTables (YMMV)
vm.nr_hugepages = 256
# Members of group my-hugetlbfs(2021) can allocate "huge" Shared memory segment
vm.hugetlb_shm_group = 2021Create a mount point for the file system
% mkdir /hugepagesAdd this line in /etc/fstab (The mode of 1770 allows anyone in the group to create files but not unlink or rename each other's files.1)
hugetlbfs /hugepages hugetlbfs mode=1770,gid=2021 0 0Reboot (This is the most reliable method of allocating huge pages before the memory gets fragmented. You don't necessarily have to reboot. You can try to run systclt -p to apply the changes. if grep "Huge" /proc/meminfo don't show all the pages, you can try to free the cache with sync ; echo 3 > /proc/sys/vm/drop_caches (where "3" stands for "purge pagecache, dentries and inodes") then try sysctl -p again. 2)
limits.conf
You should configure the amount of memory a user can lock, so an application can't crash your operating system by locking all the memory. Note that any page can be locked in RAM, not just huge pages. You should allow the process to lock a little bit more memory that just the the space for hugepages.
## Get huge-page size:
% grep "Hugepagesize:" /proc/meminfo
Hugepagesize: 4096 kB
## What's the current limit
% ulimit -H -l
64
## Just add them up... (how many pages do you want to allocate?)See Limits (ulimit -l and memlock in /etc/security/limits.conf).
我的博物馆故事 官方安卓版v1.61.2
我的博物馆故事是一款以消除为主题的经营养成类手游,在这里玩家
专业模拟飞行10 手机版v12.2.4
专业模拟飞行10安卓版是一款飞行休闲手游,顶尖的物理飞行引擎
动物起义战斗模拟器二琳同款 最新版v4.1.1
动物起义战斗模拟器是一个非常有趣的模拟类游戏,玩家可以召唤各
迷你世界七周年 安卓手机版v1.43.0
迷你世界7周年是一款由《迷你世界》官方推出的庆祝特别版本,在
劫后公司无限资源版 v1.0.5.1
劫后公司内置菜单版是游戏的破解版本,在该版本中为玩家提供了内