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了。




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章