Linux下DB2的安装问题:SQL1220N
环境:Linux REDHAT5DB2 FOR Linux 32bit由于该版本无法改变安装目录,默认安装在/opt下,所以事先要分配足够的空间给/目录,或者
环境: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)
推荐阅读
-
linux下tar命令遇到error:"Error exit delayed from previous errors"的问题及解决
-
Broadcom网卡linux系统下无法连接到网络问题的解决办法
-
linux下安装oracle后使用命令行启动的方法 linux启动oracle
-
解决Windows环境下安装 mysql-8.0.11-winx64 遇到的问题
-
Microsoft Visual Studio 2010 Ultimate 下安装wcsf 2010出现问题的解决方法
-
Linux下Nginx安装的方法(pcre和openssl)
-
linux下Nginx 0.8.40的安装方法
-
Linux下Docker CE使用从包中安装的方式详解
-
详解Linux下JDK、Tomcat的安装及配置
-
Linux系统下安装jdbc与tomcat的图文教程