Linux下DB2的安裝問題: SQLSTATE=57019

環境: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)
[http://www.linuxidc.com/Linux/2008-06/13742.htm]
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章