关闭

db2 with SQLCODE: -668, SQLSTATE: 57016, SQLERRMC: 7;

659人阅读 评论(0) 收藏 举报
分类:

I've tried many forms, like reorg table EXP_RECORD;

reorg table db2u7015.EXP_RECORD;

 

and I am using DbVisualizer, can be that the problem?looks like the editor doesn't recognize command reorg, because it doesn'thighlight the word as it does with works like table or select…

 

REORG is not SQL, it is a DB2 command and cannot beexecuted as if it was SQL. You can either use the CLP to use REORG or you canuse:IBM DB2 9.5 Information Center for Linux, UNIX, andWindows if you must use SQL.

 

Simply issue these on the shell command line:

db2 connect to <your database name here>

db2 REORG TABLE DB2ADMIN.XCATENTRYEXT

 

<jdbcConnectiondriverClass="com.ibm.db2.jcc.DB2Driver"

               connectionURL="jdbc:db2://172.17.106.194:50000/qa3new"userId="db2inst"

               password="*****">

</jdbcConnection>

 

首先登陆到172.17.106.194 DB2服务器,然后切换用户su db2inst,执行db2命令后如下所示:


然后执行connect toqa3new命令,接着执行reorg tables SALES.TBL_SALES_COMMISSIONS命令,重构成功!

 

参考网址:

http://stackoverflow.com/questions/20396046/failing-update-table-in-db2-with-sqlcode-668-sqlstate-57016-sqlerrmc-7

https://baohua.me/database/rhel5-install-db2-v9-7-database/

http://www.dbforums.com/showthread.php?1654553-Sqlcode-668-sqlstate-57016-sqlerrmc-7

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:35455次
    • 积分:641
    • 等级:
    • 排名:千里之外
    • 原创:33篇
    • 转载:27篇
    • 译文:0篇
    • 评论:8条
    文章分类
    最新评论