当前位置:文档之家› DB2故障总结

DB2故障总结

1.还原数据库之后,客户端无法和服务器主机连接,
SQL30081N 检测到通信错误。

正在使用的通信协议:"TCP/IP"。

正在使用的通信API:"SOCKETS"。

检测到错误的位置:"192.168.247.120"。

检测到错误的通信功能:"connect"。

特定于协议的错误代码:"10061"、"*" 和 "*"。

SQLSTATE=08001
a.最可能是数据库没启动。

b.可能还原之后端口设置缺失的原因。

肯定和db2 dbm的svcename服务有关。

>>db2 get dbm cfg|grep SVCENAME
TCP/IP Service name (SVCENAME) =
SSL service name (SSL_SVCENAME)=
这里TCP/IP端口设置时缺失了。

需要手动设置。

>>db2set DB2COMM=TCP/IP,NETBIOS
设置通信方式
>>db2set
>>db2 update dbm cfg for tsbdw using svcename 50000
DB20000I The UPDATE DATABASE MANAGER CONFIGURATION command completed successfully
更新通信端口
>>db2stop
>>db2start
>>db2 get dbm cfg |grep SVCENAME
TCP/IP Service name (SVCENAME) = 50000
SSL service name (SSL_SVCENAME) =
重连数据库即可成功
2.在忘记关闭数据库的情况下重启的服务器会导致实例挂起,数据库起不起来无法执行DB2的各种命令报错
SQL6036N START or STOP DATABASE MANAGER command is already in progress.
Kill all
db2_kill + ipclean to recycle the instance
note:kill db2 process force。

(慎用,少用)
3.查找死锁进程
db2 get snapshot for locks pzbdw
db2 list applications
授权标识程序应用程序名应用程序句柄应用程序标识数据库名称代理序号
4.数据库自动护功能不能启动
A. THE DB2ADMIN has not start。

Login on the service as db2das by SSH,execute db2admin start.启动自动维护功能。

B.display some error about “codepage”。

Set the codepage=1386 ,do it like ―db2set codepage=1386‖
5.linux free the cache
/proc is a virtual file system,可以通过对他读写与kernel实体间进行通信手段。

The detail path / proc/sys/vm/drop_caches
Cat / proc/sys/vm/drop_caches
Default is 0
Sync
Execute the Sync 。

insure the integrity(完整) of file system.
Echo 3>/ proc/sys/vm/drop_caches
00 2 * * * sync && echo “3” >/proc/sys/vm/drop_caches
Add to timed task(定时),execute it at 2 am everyday。

0 –not free
1 –free then cache of page(释放页缓存)
2—free dentries 和inodes
3 –free all the cache
6.DB2 local users have no private of load and so on
Db2 connect to dedb
grant dbadm on database to user db2admin
set then firwall(close the firewall)
forever
Check the firewall
# chkconfig --list|grep fire
SuSEfirewall2_init 0:off 1:off 2:off 3:on 4:on 5:on 6:off
SuSEfirewall2_setup 0:off 1:off 2:off 3:on 4:on 5:on 6:off
关闭
linux-ot1w:/home/macula/download/hadoop-0.20.2/conf # chkconfig SuSEfirewall2_setup off
关闭
linux-ot1w:/home/macula/download/hadoop-0.20.2/conf # chkconfig SuSEfirewall2_init off
linux-ot1w:/home/macula/download/hadoop-0.20.2/conf # chkconfig --list|grep fire
Linux’s environment variable
PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:$HOME/bin
Export PATH
Linux 启动FTP报错,或者无法启动ftp
1、open yast
2、open then network service,find the xinetd
3、 check the FTP‟s service condition(about 2 as usual in SuSE),if the FTP service had opened,then close all then FTP service,choice a FTP service,then choice Eidt,delete the …x‟ of active,it will be close,then it display like “--”。

4. restart then ftp service
ftp登录报错问题
/etc/ftpuser
It is all the user who can not login on the ftp. So you can delete the user who you wanna login on
仓库网络配置
/etc/ hosts.allow add the service IP
Rar for linux setup following :
Tar the file rar for linux and then
# cd rar
-------------------------------------------------- x file
# make
mkdir -p /usr/local/bin
mkdir -p /usr/local/lib
cp rar unrar /usr/local/bin
cp rarfiles.lst /etc
cp default.sfx /usr/local/lib
-------------------------------------------------- install and compile then file # make install
mkdir -p /usr/local/bin
mkdir -p /usr/local/lib
cp rar unrar /usr/local/bin
cp rarfiles.lst /etc
cp default.sfx /usr/local/lib
-------------------------------------------------- execute rar’s help orders
# rar --help
rar: /lib/libc.so.6: version `GLIBC_2.7' not found (required by rar)
-------------------------------------------------- add then global orders
# cp -f rar_static /usr/local/bin/rar
cp: overwrite `/usr/local/bin/rar'? y。

相关主题