linux 找不到libdb2,Linux下DB2的安装问题:SQL1220N

环境:Linux RedHat5

DB2 FOR Linux 32bit

由于该版本无法改变安装目录,默认安装在/opt下,所以事先要分配足够的空间给/目录,或者专门为/opt分配空间。

安装过程无任何异常,但是安装完毕后,执行db2start出错:

1.06/18/2008 17:25:00 0 0 SQL1220N The database manager shared memory set cannot be allocated

2.查找帮助db2 ? SQL1220N。发现可能是共享内存设置少了。有以下建议。

On Linux 32-bit, increase the kernel parameter shmmax to 256 MB. On Linux 64-bit, increase the kernel parameter shmmax to 1GB.

用ipcs -l命令看了一下系统配置

------ Shared Memory Limits --------

max number of segments = 4096

max seg size (kbytes) = 3939665

max total shared memory (kbytes) = 4G

min seg size (bytes) = 1

系统有4G的最大共享内存。

vi /etc/sysctl.conf 查看结果

kernel.core_uses_pid = 1

kernel.shmmax=4034217728

kernel.msgmni = 1024

kernel.sem = 250 256000 32 1024

db2licm -l 查看,db2序列号为永久的,不过期。

这个修改了之后还是无法启动

网上搜索。IBM网站有这么一篇文章。提到了这个问题的处理方法。

Problem

This technote provides troubleshooting methods for when you attempt to start an instance (db2start) and encounter the following error: SQL1220N The database manager shared memory set cannot be allocated.

Cause

One possibility is that during the creation of the instance the file sqllib/.ftok was not created.

Problem Details

After the creation of a new instance the db2start command can fail with the following message:

06/02/2005 11:45:48 0 0 SQL1220N The database manager shared memory set cannot be allocated.

SQL1032N No start database manager command was issued. SQLSTATE=57019

DB2 was unable to allocate its shared memory set.

Solution

A quick work-around is to use the executable db2ftok (found in sqllib/bin) to create a new seed file sqllib/.ftok. The .ftok file is generated based on the current time and other information. When starting the instance, DB2 reads the .ftok file and creates a standard interprocess communication key (IPC key) which is later supplied to other subroutines for memory allocation.

After the .ftok file has been created, issue the db2start command again.

Please note that in order to determine the reason why the .ftok file was absent in your particular environment, contact DB2 UDB Support and submit a problem record.

按照其说明,执行db2ftok,再db2start,Ok。

问题回顾:问题解决之后,回过头来分析,可能是/opt空间属性有问题,导致安装过程中不能产生.ftok文件,因为安装完成后,执行db2start,提示无权执行,后来修改了目录属主为db2inst1就可以执行了,然后就出现了上面的错误。 (作者:dongyufeng)0b1331709591d260c1c78e86d0c51c18.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值