DB2的各位朋友们,你们好!
我遇到了一个问题,程序日志中出现如下错误日志信息:
“清理表时报错[sql=
delete from td_pm_NET_INTERFACE where partition = 5 and end_time < timestamp('2011-05-21 16:24:00')]:
StatementCallback; uncategorized SQLException for SQL
[delete from td_pm_NET_INTERFACE where partition = 5 and end_time < timestamp('2011-05-21 16:24:00')]; SQL state [57011]; error code [-964]; DB2 SQL error: SQLCODE: -964, SQLSTATE: 57011, SQLERRMC: null; nested exception is com.ibm.db2.jcc.b.SqlException: DB2 SQL error: SQLCODE: -964, SQLSTATE: 57011, SQLERRMC: null”
上面这个报错是什么意思?
用Db2客户端,首先我用SQL查询:
select count(time) from td_pm_oracle_tablespace where partition = 5 and time < timestamp('2011-05-21 10:24:00');
结果: 832793
耗时:78.493secs
后面我 使用删除语句
SQL:delete from td_pm_oracle_tablespace where partition = 5 and time < timestamp('2011-05-21 10:24:00');
报错Error Message:
20:07:12 [DELETE - 0 row(s), 0.000 secs] [Error Code: -964, SQL State: 57011] DB2 SQL Error: SQLCODE=-964, SQLSTATE=57011, SQLERRMC=null, DRIVER=3.57.82
... 1 statement(s) executed, 0 row(s) affected, exec/fetch time: 0.000/0.000 sec [0 successful, 0 warnings, 1 errors]
------解决方案--------------------------------------------------------
你的表空间太小了,可以分开删除,或者增加临时表空间。