在Oracle Linux 6.1 上安裝Oracle 10.2.0.1, 在dbca 建instance的時候遇到了:
ORA-27125:unable to create shared memory segment
安裝被中斷
rac2:/u02> oerr ora 27125
27125, 00000, "unable to create sharedmemory segment"
// *Cause: shmget() call failed
// *Action: contact Oracle support
解決方案如下:
[root@rac2 ~]# id oracle
uid=500(oracle) gid=501(oinstall)groups=501(oinstall),502(dba),503(asmadmin),504(oper)
[root@rac2 ~]# more/proc/sys/vm/hugetlb_shm_group
0
下面用root執行下面的命令,將dba組添加到系統核心中:
[root@rac2 ~]# echo 502 >/proc/sys/vm/hugetlb_shm_group
--這裡的502 是上面的id 命令查看出來的。
[root@rac2 ~]# more /proc/sys/vm/hugetlb_shm_group
502
然後重新DBCA,成功建立執行個體。 如果遇到執行個體名以存在的提示,刪除/etc/oratab 中對應的記錄即可。
hugetlb_shm_group 說明:
hugetlb_shm_group contains group id that isallowed to create SysV shared memory segment using hugetlb page
When a process uses some memory, the CPU ismarking the RAM as used by that process. For efficiency, the CPU allocate RAMby chunks of 4K bytes (it's the default value on many platforms). Those chunksare named pages.
Those pages can be swapped to disk, etc.
Since the process address space are virtual, the CPU and the operating systemhave 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 thememory is mapped. When a process
uses 1GB of memory, that's 262144 entries to lookup (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 lessentries to look-up), those are named Huge pages (on Linux), Super Pages (onBSD) or Large Pages (on Windows), but it all the same thing.
---------------------------------------------------------------------------------------------
平台環境:Linux Red Hat Enterprise Linux Server release 6.0 (Santiago)
資料庫版本:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
安裝好ORALCE資料庫後,啟動資料庫就會報如下錯誤
參考http://www.eygle.com/archives/2011/12/hugepageshugetl.html 文章,說跟hugetbl有關,只需按如下操作
[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即可一勞永逸的解決這個問題:
vm.hugetlb_shm_group = 501
原文連結:http://www.cnblogs.com/kerrycode/archive/2012/04/23/2466980.html