关于Oracle 10g在Solaris 10(x86-64)关于ORA-27102:Out Of Memory的问题
使用版本10.2-10.4,且该文档适用于各个平台。
一、症状如下:
1、 不能将SGA设置超过3GB。当设置sga_target和sga_max_size比3GB大的时候,将抛出一下错误:
'ORA-27123: unable to attach to shared memory segment'
2、 Solaris 10 (x64,x86) on HP/AMD Operton处理器
3、 当sga_target和sga_max_size比下的值大时遇到的错误:
sga_target=3000000000
sga_max_size=3000000000
4、 在服务器上有足够的内存(63.99GB)
5、 Project.max-shm-memory正确设置,projects设置如下:
sundad# projects -l
system
projid : 0
comment: ""
users : (none)
groups : (none)
attribs:
user.root
projid : 1
comment: ""
users : (none)
groups : (none)
attribs:
noproject
projid : 2
comment: ""
users : (none)
groups : (none)
attribs:
default
projid : 3
comment: ""
users : (none)
groups : (none)
attribs:
group.staff
projid : 10
comment: ""
users : (none)
groups : (none)
attribs:
projid : 100
comment: "oracle"
users : (none)
groups : (none)
attribs: process.max-sem-nsems=(privileged,256,deny)
project.max-sem-ids=(privileged,8000,deny)
project.max-shm-ids=(privileged,100,deny)
project.max-shm-memory=(priv,42949672960,deny)
sundad#
6、 如果将project.max-shm-memory参数值改变,问题依然存在。
二、引起问题的原因
1、几个关于solaris(x86-64)安装时出现ora-27012错误。
2、这个由于solaris资源管理器正运行。
3、关于Sun公司project的文档请参考
http://docs.sun.com/app/docs/doc/816-5166/6mbb1kqcl?a=view
4、oracle instance无法根据当前的设置和工作区project用”projmod”启动实例。
三、解决方法:
1、设置/etc/system下的shmsys:shminfo_shmmni 和shmsys:shminfo_shmmax
set shmsys:shminfo_shmmax=6442450944
set shmsys:shminfo_shmmni=100
Before: prctl <pid of crsd>
project.max-shm-memory
privileged 1.95GB - deny
system 16.0EB max deny
After reboot: prctl <pid of crsd>
project.max-shm-memory
privileged 600GB - deny
2、如果不用/etc/system,可以用/root/oracle/default下的project进行设置:
ps -ef | grep crsd =>
root 553 1 0 12:18:04 ? 0:01
/refresh/oracle/product/10.1.
0/crs/bin/crsd.bin reboot
newtask -p <that project> -c <that pid>
i.e. newtask -p default -c 553
prctl 553 ==>
project.max-shm-memory
privileged 2.00TB - deny
system 16.0EB max deny
And srvctl can start instances with SGA > 1.95 SGA w/o using /etc/system