LINUX-SUSE上安装完db2 实例相关问题

如果安装db2后忘记实例,那就是默认的用户名,用户名也忘记了,到/home/下查找,

新安装db2后,如果客户端连接报错:ERRROCODE=-4499,SQLSTATE=08001 

 

官方三个原因:

DB2 is stopped.
The wrong DB2 database listening port number is specified.
The wrong database name is specified

 

执行db2start命令可以启动服务

db2与其他的数据库不同,需要执行命令创建数据库后才能执行客户端连接

 

查询db2的端口号  db2 get dbm dfg

 

如果查询实例下的数据库信息,切换到该实例用户执行:db2  list db directory

 

 

其他相关报错(转载):

Error 2: DB2 return code is -4222
For this problem, the host name is probably specified incorrectly.

Error 3: DB2 return code is -4214
Three problems might be the cause of this error.
The user name is invalid
The password is invalid.
Both the user name and the password are invalid.

 
 
Resolving the problem
The following procedures might help you resolve the connection failure problem:
Resolving Error 1: DB2 return code is -4499
Check whether DB2 is started.
Check whether the database exists. Use the command

db2 list db directory to list the databases.
Check the DB2 listening port. The DB2 instance is listening on Port 50000 by default, but the port number might have been modified.
Restart DB2 or restart the computer on which DB2 is running, because there might be too many connections already active for DB2 to respond to the new request.

Resolving Error 2: DB2 return code is -4222
If the wrong host name is specified, or the DNS server cannot parse the host name, then you can use the command ping hostname, where hostname is the host name, to test the connection. You can also use the IP address directly in this command.
Check the privileges of folder /tmp/CM/db2cmv8. The DB2 Content Manager installer performs the su command to DB2 Content Manager accounts to test the connection. For example, if you have an icmadmin account as the library server administrator, the installer uses this account, creates a shell script under the /tmp/CM/db2cmv8 folder, and runs it to see the result. If the folder does not have the write and execute privileges for icmadmin, the connection test fails.

Resolving Error 3: DB2 return code is -4214
Check that the user name and password are specified correctly.
Check that the password does not contain special characters, such as the dollar sign ($).

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值