DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=<UserID>.USER_TABLES, DRIVER=3.57.82

转一下解决方法:http://www-01.ibm.com/support/docview.wss?uid=swg21613531


1. Obtain some downtime (nobody using ANY databases hosted on the DB2 server)

2. Shutdown Controller application server (to ensure that there are no connections to the DB2 database)

3. Logon to DB2 database server as an administrator
4. Click "Start - Programs - IBM DB2 - DB2COPY1 (Default) - Command Line Tools - Command Window"

5. Type the following:

db2set DB2_COMPATIBILITY_VECTOR=ORA
6. If necessary (if this has not already been done in the past), also type: db2set DB2_DEFERRED_PREPARE_SEMANTICS=YES
7. Stop the DB2 server by running the following command: db2stop
8. Start the DB2 server by running the following command: db2start
9. Delete the old (bad) Controller application repository database (the one that failed earlier) 
10. Create a new DB2 database, to be your Controller application repository database
  • TIP: For advice on how to do this, see separate IBM Technote #1570572.


原因:db2set 未设置 DB2_COMPATIBILITY_VECTOR 、DB2_DEFERRED_PREPARE_SEMANTICS

这里注意db2set是跟用户相关的,选择相应的用户连接DB,然后再db2set,这样才能生效。我之前一直以administrator连接数据库,各种操作都有了,还是没用;后来发现是连接的用户不对。

connect to db user db2admin using ****** 

这样再set就OK了。




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值