解决solaris10上因为共享内存不足导致不能初始化sybase15.0.3服务的问题

此篇为对以前的问题的整理。

solaris 10 64-bit上安装Sybase15.0.3 ESD#1,程序安装好了后用资源文件 resource-files来创建服务 。但是老是报不能创建共享内存 的错误。
Solaris环境为: 
Sun OS 5.10 Generic_127111-11 sun4v sparc SUNW,SPARC-Enterprise-T5120
16G内存,64核CPU

共享内存已经配置为如下,故没有调整。

root@SERVER # more /etc/system | grep shm
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=10
set shmsys:shminfo_shmmax=4294967295
*               exclude: sys/shmsys
set shmsys:shminfo_shmmax=10294967295
set shmsys:shminfo_shmmin=1
* set shmsys:shminfo_shmmni=100
* set shmsys:shminfo_shmseg=10
*       set shmsys:shminfo_shmmax = 268435456
*       set shmsys:shminfo_shmseg = 1024
*       set shmsys:shminfo_shmmni = 1024
        set shmsys:shminfo_shmmni = 4096

其中曾经重启过一次服务器

但是用资源文件创建服务时,srvbuildres -I /app/sybase/interfaces -r /app/sybase/srvbuild-adaptiveserver.res
一直下面的报错。

-bash-3.00$ more srvbuild0111.017
Mon Jan 11 22:55:57 2010: srvbuild/15.0.3 ESD #1/P/Sun_svr4/SunOS 5.8/EBF 16556/OPT/Mon Ma
r  9 02:14:53 PDT 2009
Mon Jan 11 22:55:57 2010: Getting attribute values from sybinit resource file `/app/sybase
/srvbuild.adaptive_server.rs'.
Mon Jan 11 22:55:57 2010:
Mon Jan 11 22:55:57 2010:
Mon Jan 11 22:55:57 2010:
Mon Jan 11 22:55:57 2010:
type = 1
application_type = MIXED
server_page_size = 4k
master_device_physical_name = /app/sybdata/master.dat
master_device_size = 200
master_database_size = 160
sybsystemprocs_device_physical_name = /app/sybdata/rsystemprocs.dat
sybsystemprocs_device_size = 200
sybsystemprocs_database_size = 200
errorlog = /app/sybase/ASE-15_0/install/SYBASE.log
configfile = /app/sybase/ASE-15_0/SYB_XXXX_TEST.cfg
sybsystemdb_device_physical_name = /app/sybdata/rsystemdb.dat
sybsystemdb_device_size = 20
sybsystemdb_database_size = 20
tempdb_device_physical_name = /app/sybdata/tempdbdev.dat
tempdb_device_size = 100
tempdb_database_size = 100
shmem = /app/sybase/ASE-15_0
default_backup_server = SYB_XXXX_TEST_BS
ifiledir = /app/sybase
addl_cmdline_parameters =
do_configure_pci = no
sybpcidb_device_physical_name = PUT_THE_PATH_OF_YOUR_SYBPCIDB_DATA_DEVICE_HERE
sybpcidb_device_size = 48
sybpcidb_database_size = 48
server_name = SYB_XXXX_TEST
force_buildmaster = no
do_optimize_config = no
Mon Jan 11 22:55:57 2010: (Shell command) /app/sybase/ASE-15_0/bin/dataserver -d/app/sybda
ta/master.dat -b200M -z4k -sSYB_XXXX_TEST -e/app/sybase/ASE-15_0/install/SYBASE.log -T1623
> /tmp/sbAAAjCaGrf 2>&1
dataserver: master device size for this server: 200.0 Mb
dataserver: master database size for this server: 26.0 Mb
dataserver: model database size for this server: 6.0 Mb
00:00000:00000:2010/01/11 22:55:57.87 kernel  SySAM: Using licenses from: /app/sybase/SYSA
M-2_0/licenses
00:00000:00000:2010/01/11 22:55:57.96 kernel  SySAM: Checked out license for 1 ASE_CORE (2
009.1231/permanent/19B3 47BC 0B7E 8DC3).
00:00000:00000:2010/01/11 22:55:57.96 kernel  This product is licensed to: ASE Developer E
dition - For Development and Test use only
00:00000:00000:2010/01/11 22:55:57.96 kernel  Checked out license ASE_CORE
00:00000:00000:2010/01/11 22:55:57.96 kernel  Adaptive Server Enterprise (Developer Editio
n)
00:00000:00000:2010/01/11 22:55:57.97 kernel  Initializing device /app/sybdata/master.dat
from offset 0 with zeros.
00:00000:00000:2010/01/11 22:56:00.46 kernel  Finished initialization.
00:00000:00000:2010/01/11 22:56:00.47 kernel  Using config area from primary master device
.
00:00000:00000:2010/01/11 22:56:00.47 server  Configuration Error: Configuration file, '/a
pp/sybase/SYB_XXXX_TEST.cfg', does not exist.
00:00000:00000:2010/01/11 22:56:00.66 kernel  Warning: A configuration file was not specif
ied and the default file '/app/sybase/SYB_XXXX_TEST.cfg' does not exist. ASE creates the d
efault file with the default configuration.
00:00000:00000:2010/01/11 22:56:00.68 kernel  Warning: Using default file '/app/sybase/SYB
_XXXX_TEST.cfg' since a configuration file was not specified. Specify a configuration file
name in the RUNSERVER file to avoid this message.
00:00000:00000:2010/01/11 22:56:00.69 kernel  os_create_region: can't allocate 70795264 by
tes

00:00000:00000:2010/01/11 22:56:00.69 kernel  kbcreate: couldn't create kernel region.
00:00000:00000:2010/01/11 22:56:00.69 kernel  kistartup: could not create shared memory
Mon Jan 11 22:56:00 2010: Buildmaster return code: 0.
sybdata/master.dat -e/app/sybase/ASE-15_0/install/SYBASE.log -c/app/sybase/ASE-15_0/SYB_XXXX_TEST.cfg -M/app/sybase/ASE-15_0 -i/app/sybase -sSYB_XXXX_TEST -T1623 > /dev/null 2>&1
-bash-3.00$

是共享内存的问题吗?我不是已经按照安装文档上的说明修改了solaris的共享内存了吗?

后来,经过咨询solaris工程师,原来是solaris10和以前的solaris9在共享内存上有些不同。solaris10修改了共享内存方式,针对用户级别可以设置用户所能共享的内存段。

为sybase用户在项目数据库中添加一条记录,命令如下:

projadd -U sybase -p 1233 -c "sybase parameters" user.sybase
projmod -sK "project.max-shm-memory=(priv,6G,deny)" user.sybase
projmod -sK "project.max-sem-ids=(priv,100,deny)" user.sybase
projmod -sK "process.max-sem-nsems =(priv,256,deny)" user.sybase

另外,可以查看文件/etc/project来检查上面的配置是否生效。

修改完之后,再次执行srvbuildres命令创建sybase主服务,成功!

————————————————————————————————-
—- 本文为andkylee个人原创,请在尊重作者劳动成果的前提下进行转载;
—- 转载务必注明原始出处 : http://www.dbainfo.net
—- 关键字:ASE solaris 10 shared memory projadd 共享内存 couldn't create kernel region
————————————————————————————————-

  • 本文链接地址:http://www.sybrepair.com/sybase-ase-initialize-service-solaris-share-memory-segment-projadd.htm
  • 本文为dbainfo个人原创,请在尊重作者劳动成果的前提下进行转载;
  • 转载务必注明原始出处 : Sybase数据库技术,数据库恢复专家
  • 对《解决solaris10上因为共享内存不足导致不能初始化sybase15.0.3服务的问题》有何疑问或见解,请在本文下方发表;
  • 对网站还有其他问题或建议,请提交在留言板,谢谢!
  • 目前还没有任何评论.
    :wink: :twisted: :roll: :oops: :mrgreen: :lol: :idea: :evil: :cry: :arrow: :?: :-| :-x :-o :-P :-D :-? :) :( :!: 8-O 8)