操作系统核心参数shmmax以字节为单位限制了共享内存段的最大尺寸,这个值限制了SGA的最大大小。如果设置太小,在创建数据库时将出现下面的错误:
ORA-27123: unable to attach to shared memory segment
shmma参数建议至少设置到1GB,一般应该设置到2GB以上。
这里我们在Linux操作系统平台上模拟shmma参数设置过小报错的过程。
1.调整shmmax参数大小
[root@secdb ~]# vi /etc/sysctl.conf
…… 省略其他参数 ……
# Controls the maximum shared segment size, in bytes
#kernel.shmmax = 4294967295
kernel.shmmax = 229496729
此时我们由原来的“4294967295”调整为“229496729”不到300M。
2.是调整生效
[root@secdb ~]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 229496729
kernel.shmall = 268435456
kernel.sem = 100
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
3.在oracle用户下使用dbca工具建库
关于建库的配置过程不赘述。注意下面的内存分配页面,我们这里手工将SGA大小调整为300M,点击“Next”后便会获得报错提示信息。
4.小结
在安装部署Oracle数据库实例时,建议严格按照部署安装手册在操作,不然很有可能因为细枝末节导致问题频出。
Good luck.
secooler
11.07.06
-- The End --
ORA-27123: unable to attach to shared memory segment
shmma参数建议至少设置到1GB,一般应该设置到2GB以上。
这里我们在Linux操作系统平台上模拟shmma参数设置过小报错的过程。
1.调整shmmax参数大小
[root@secdb ~]# vi /etc/sysctl.conf
…… 省略其他参数 ……
# Controls the maximum shared segment size, in bytes
#kernel.shmmax = 4294967295
kernel.shmmax = 229496729
此时我们由原来的“4294967295”调整为“229496729”不到300M。
2.是调整生效
[root@secdb ~]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 229496729
kernel.shmall = 268435456
kernel.sem = 100
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
3.在oracle用户下使用dbca工具建库
关于建库的配置过程不赘述。注意下面的内存分配页面,我们这里手工将SGA大小调整为300M,点击“Next”后便会获得报错提示信息。
![bb](http://img.blog.itpub.net/blog/attachments/2011/07/519536_201107071438541.gif?x-oss-process=style/bb)
4.小结
在安装部署Oracle数据库实例时,建议严格按照部署安装手册在操作,不然很有可能因为细枝末节导致问题频出。
Good luck.
secooler
11.07.06
-- The End --
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/519536/viewspace-701615/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/519536/viewspace-701615/