1. Install DB2 Fixpack:
杀掉DB2相关进程db2fm etc db2fmcu –d db2fm –i dasusr1 -k
DB2LICM –L DB2LEVEL
1) 停止所有DB2进程 su - db2inst1
. /sqllib/db2profile
db2 force applications all db2 terminate db2stop
su - dasusr1 db2admin stop
2) 解压缩文件:
zcat cm58ml.tar.Z | tar -xvf - gunzip cm58ml.tar.gz | tar -xvf -
zcat *.Z | tar -xvf -(when Files too large)
jar xvf install.zip(在Unix环境下解压缩.zip文件) 3) AIX文件系统大小限制:vi /etc/security/limits 修改limit=-1 执行ulimit 需要重新log out login
vi /etc/security/limits -1 -1 ulimit
3) ./installFixPak -y 4) 更新实例(root)
对于每个实例,发出下列命令:
INSTHOME/instance/db2iupdt db2inst1
更新 DAS 实例,发出以下命令: INSTHOME/instance/dasupdt dasusr1 5).重新启动实例 su - db2inst1 db2start
db2 create db mydb using codeset UTF8 TERRITORY US(codepage =1208)
db2 create db testdb using codeset GBK territory CN(codepage=1386)
不能实现从819到1383的转换
db2set DB2CODEPAGE=819/1396(当提示不能转换) db2 terminate(必须执行,否则环境变量不起作用)
*******************************************************************************
2.DB2基本命令
关于备份和恢复
db2 backup database sample to c:\\wang
DB2 LIST history backup all for crams_js;
db2 restore db sample from c:/wang without rolling forward without prompting 注意:restore之后会处于前滚暂挂状态,需要用rollforward解除
DB2 ROLLFORWARD DB SAMPLE TO END OF LOGS AND STOP
3. CM 安装问题
oslevel –r instfix –i |grep ML 针对Linux操作系统
export LD_ASSUME_KERNEL=2.2.5
1)在非支持的操作系统下(如XP)安装 CM/VC/IIC/EC
IBM_CM_DEBUG = null(CM,IIC.EC)
IBM_CM_IGNORE_PREREQ= CM(IIC/EC)
表RMDB.RMOBJECTS存放所有CM对象存储位置 测试HTTP连接:
http://localhost:9081/icmrm/snoop https://localhost:9444/icmrm/snoop
设置CM的数据库路径
# cd /cmdb
# mkdir db2data
# chown –R db2inst2:db2iadm2 db2data
# db2 update dbm cfg using DFTDBPATH /cmdb/db2data
当系统管理控制台中只能看到Content Manager时,查看
D:\\Program Files\\IBM\\db2cmv8\\admin\\common\\cmadmin.properties 1->2 D:\\Program Files\\IBM\\db2cmv8\\admin\\common\\cmadmincfg.properties
当修改机器名之后
DB2:修改DB2NODE.CFG WAS:REINSTALL
HTTPSERVER:httpd.conf ServerName=hostname 重启HTTPserver: apachectl start/restart
问题1:安装过程中如果提示由于automount service is running安装程序无法自动创建用户和组;
需要运行: stopsrc -s automountd
问题2:安装过程中如果提示9090端口冲突
需要: 当出现网络冲突时9090:address name is already be used(套接字名称已经被使用) /appserver/logs/server1/SystemErr.log
Failed to start transport on host,port 9090;the most likely cause is that the port is already in use.pls ensure that no other applications are using this port and restart the server 方法1:/usr/websm/bin/wsmserver/ 执行wsmserver -disable
方法2:vi /etc/inetd.conf
修改最后一行wsmserver -start 改为-disable refresh -s inetd netstat -an|more
shift + g进入文档结尾 # netstat -an|grep 9090
tcp4 0 0 *.9090 *.* LISTEN # vi /etc/inetd.conf
## comment the following line for WAS installation
# wsmserver stream tcp nowait root /usr/websm/bin/wsmserver
wsmserver –start # refresh -s inetd
0513-095 The request for subsystem refresh was completed successfully. # netstat -an|grep 9090
tcp4 0 0 *.9090 *.* LISTEN # vi /etc/inetd.conf
## comment the following line for WAS installation
# wsmserver stream tcp nowait root /usr/websm/bin/wsmserver
wsmserver –start # refresh -s inetd
0513-095 The request for subsystem refresh was completed successfully.
问题3:当提示DGL5161A时,需要配置hosts文件(IP + hosts);或者修改rmdb的特性:主机名改为IP地址
问题4: 打开资源管理器rmdb,提示\DGL5162A:System Managed Storage(SMS) request to RM failed.ICM9742 Resource manager administrative logon failed in SMS-logon order\
解释:
The logon to the resource manager administrative functions failed. 原因:
Either the user name or password was incorrect. Check the spelling and capitalization of the user name and password 方法:
1.stopserver icmrm 2.WebSphere: c:\\Program
Files\\WebSphere\\AppServer\\installAPPS\\ccbtest\\icmrm.ear\\WEB-INFO\\classes\\com\\ibm\\mm\\icmrm\\icmrm.properties修改DBPassword=password
3.DB2:
修改rmadmin.rmaccess中的密码信息;
db2 connect to rmdb user rmadmin using password
db2 update rmadmin.rmaccess set ACC_PASSWORD='password' where acc_username='rmadmin'
db2 connect to icmnlsdb user icmadmin using password
db2 update icmstresourcemger set rmpassword='password' where rmuserid='RMADMIN' 4.startserver icmrm
问题5:当提示DGL5164A 来自资源管理器地相应有错误\
则应该停止icmrm; 执行. /home/db2inst1/sqllib/db2profile后启动icmrm(或者rm密码不正确,需要检查rmadmin用户口令是否到期,或者按照问题2的方法解决-修改密码) cmbenv81 set CL
在运行icmrm服务器时,先执行
. /home/db2inst1/sqllib/db2profile . ./cmbenv81.sh
./startServer.sh icmrm
设置CM的数据库路径
# cd /cmdb
# mkdir db2data
# chown –R db2inst2:db2iadm2 db2data
# db2 update dbm cfg using DFTDBPATH /cmdb/db2data
单独安装库服务器数据库cmcfgls.bat(D:\\Program Files\\IBM\\db2cmv8\\config) 修改文件icmlsdb2def.ddl(config):
CREATE database %ICM_LS_DBNAME% %ICM_LS_DRIVE%

