DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=.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了。




你可能感兴趣的:(DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=.USER_TABLES, DRIVER=3.57.82)