Error running RUNSTATS from DB2 API stage
Posted: Tue Nov 27, 2007 3:11 am
Hello All
I'm trying to fire the following RUNSTATS command from SQL>After in DB2 API stage:
RUNSTATS on BKH.CNTAC with distribution and sampled detailed indexes all allow write access;
Same command executes successfully when fired from DB2 client. But it's throwing warnings when run from DataStage:
db2_SALES_CNTAC_TRAN_ins,0: Warning: djp_SALES_CNTAC_TRAN.db2_SALES_CNTAC_TRAN_ins: SQLExecDirect: Error executing statement '
RUNSTATS on table BKH.CNTAC with distribution and sampled detailed indexes all allow write access'. See following DB2 message for details.
db2_SALES_CNTAC_TRAN_ins,0: Warning: djp_SALES_CNTAC_TRAN.db2_SALES_CNTAC_TRAN_ins: [IBM][CLI Driver][DB2/AIX64] SQL0104N An unexpected token "table" was found following "RUNSTATS on ". Expected tokens may include: "JOIN". SQLSTATE=42601
I don't think anything wrong with the command syntax since I'm able to run it from DB2 client.
Any help would be appreciated. Thanks!
I'm trying to fire the following RUNSTATS command from SQL>After in DB2 API stage:
RUNSTATS on BKH.CNTAC with distribution and sampled detailed indexes all allow write access;
Same command executes successfully when fired from DB2 client. But it's throwing warnings when run from DataStage:
db2_SALES_CNTAC_TRAN_ins,0: Warning: djp_SALES_CNTAC_TRAN.db2_SALES_CNTAC_TRAN_ins: SQLExecDirect: Error executing statement '
RUNSTATS on table BKH.CNTAC with distribution and sampled detailed indexes all allow write access'. See following DB2 message for details.
db2_SALES_CNTAC_TRAN_ins,0: Warning: djp_SALES_CNTAC_TRAN.db2_SALES_CNTAC_TRAN_ins: [IBM][CLI Driver][DB2/AIX64] SQL0104N An unexpected token "table" was found following "RUNSTATS on ". Expected tokens may include: "JOIN". SQLSTATE=42601
I don't think anything wrong with the command syntax since I'm able to run it from DB2 client.
Any help would be appreciated. Thanks!