db2小用

本文探讨了DB2数据库在实际应用中遇到的问题,包括更新速度慢、工具支持不足等,并分享了远程连接失败的解决方案。

db2真是不好用(8.0.?)

难道升级版会好一些?无语

1>update超级慢....(这点还不如access,175万记录)

2>execute immediate 不支持基本的export 和output(貌似也没有在oracle里面测试过这个功能)

打升级补丁后可以

3>周边工具少,安装繁琐.

4> inner join 的update不支持

5>connect to db  不需要密码,多个库公用一个密码..

为什么做事情不可以变通一些呢?又是规矩作祟,呵呵。

----------------------------------错误总结:---------------------------------------------------------------------------------

jdbc远程连接失败...

连接代码

public static void main(String[] args) throws ClassNotFoundException, SQLException {
  // TODO Auto-generated method stub
  Class.forName("com.ibm.db2.jcc.DB2Driver");


  // connect
  Connection db2Conn =DriverManager.getConnection(
  "jdbc:db2://***.***.***.***:50001/dbname",
  "instname",
  "passwd");
 
  Statement st = db2Conn.createStatement();
  String queryStr ="SELECT a.id FROM tabletest a order BY a.ID";
  ResultSet resultSet = st.executeQuery(queryStr);
  while (resultSet.next())
  {
        string id = resultSet.getString( "ID" );
        System.out.println( id );
  }
  resultSet.close();
  st.close();
  db2Conn.close();  
 }

---------------------------------------search 结果---------------------------------------------------------------

Try this. This works if password is expired by OS.
connect to sample user db2inst1 using xxxx new xxxxx confirm xxxxxx

db2 grant connect, createtab, bindadd on database to user celiacy


This is known problem when using DB2 8.2 and AIX5.3
(don't know if already fixed in newer fix packs)
If you use this db2set setting and restart the instance the problem is
"solved":
db2set DB2_NUM_CKPW_DAEMONS=0

---------------------------------------------more---------------------------------------------------------------------------------
 

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值