others - Tibco BW DB2错误: SQLCODE=-952, > SQLSTATE=57014

我从BW调用DB2存储过程。

当我在数据库中测试这个过程时,它被正确地执行。但是当我通过bw调用时抛出异常

报告了JDBC错误:(SQLState =57014 )- com.ibm.db2.jcc.am.SqlException:DB2 SQL错误:sql code =-952.SQL state =57014.SQLERRMC =null,

我存储过程的代码如下


CREATE OR REPLACE PROCEDURE TABLE1_PURGE_PROC_V1 (IN v_REF_VERSION VARCHAR(3), OUT o_DELTETE_STATUS VARCHAR(7))
 P1: BEGIN

 --DECLARE v_TABLE_NAME VARCHAR(30);
 DECLARE v_WHERE_CONDITION VARCHAR(1024);
 DECLARE V_COUNT_QUERY VARCHAR(1024);
 DECLARE v_COMMIT_COUNT INTEGER;

 SET v_WHERE_CONDITION='REF_VERSION ='||v_REF_VERSION;
 SET v_COMMIT_COUNT=10000;


 CALL SCHEMA.DELETE_WITH_COMMIT_COUNT('SCHEMA.TABLE1',v_COMMIT_COUNT,v_WHERE_CONDITION);
 CALL SCHEMA.DELETE_WITH_COMMIT_COUNT('SCHEMA.TABLE2',v_COMMIT_COUNT,v_WHERE_CONDITION);
 CALL SCHEMA.DELETE_WITH_COMMIT_COUNT('SCHEMA.TABLE3',v_COMMIT_COUNT,v_WHERE_CONDITION);
 CALL SCHEMA.DELETE_WITH_COMMIT_COUNT('SCHEMA.TABLE4',v_COMMIT_COUNT,v_WHERE_CONDITION);


 INSERT INTO SCHEMA.DEBUG_LOG(PROC_NAME,LOG_TIME,MESSAGE) VALUES('TABLE1_PURGE_PROC_V1',CURRENT_TIMESTAMP,'ALL TABLE1 RELATED TABLES INVALID DATA DELETED FOR VERSION-'||v_REF_VERSION);

 SET o_DELTETE_STATUS ='SUCCESS';
 END P1 

 ####################################### PROC 2 ###########################################################
 CREATE OR REPLACE PROCEDURE DELETE_WITH_COMMIT_COUNT(IN v_TABLE_NAME VARCHAR(24), IN v_COMMIT_COUNT INTEGER, IN v_WHERE_CONDITION VARCHAR(1024))
 NOT DETERMINISTIC
 LANGUAGE SQL
 P1: BEGIN
 -- DECLARE Statements
 DECLARE SQLCODE INTEGER;
 DECLARE v_DELETE_QUERY VARCHAR(1024);
 DECLARE v_DELETE_STATEMENT STATEMENT;


 SET v_DELETE_QUERY = 'DELETE FROM (SELECT 1 FROM ' || v_TABLE_NAME || ' WHERE ' || v_WHERE_CONDITION
 || ' FETCH FIRST ' || RTRIM(CHAR(v_COMMIT_COUNT)) || ' ROWS ONLY) AS DELETE_TABLE';

 PREPARE v_DELETE_STATEMENT FROM v_DELETE_QUERY;


 DEL_LOOP:
 LOOP
 EXECUTE v_DELETE_STATEMENT;
 IF SQLCODE = 100 THEN
 INSERT INTO TEP.DEBUG_LOG(PROC_NAME,LOG_TIME,MESSAGE) VALUES('DELETE_WITH_COMMIT_COUNT',CURRENT_TIMESTAMP,'ALL DATA DELETED FROM'||v_TABLE_NAME||'QUERY USED IS'||v_DELETE_QUERY);
 LEAVE DEL_LOOP; 
 END IF;
 COMMIT;
 END LOOP; 
 COMMIT;
 END P1 

如何在db2中处理这个

时间:

我将Tibco超时时间增加到现在的6分钟。

...