SqlDbx
You are not logged in.
Pages: 1
Can someone please give me an example of how to run a RUNSTATS command via SQLDBX ?
For the life of me I cannot get the command to work as it fails with the following error:
SQL0104N An unexpected token "TABLE" was found following "RUNSTATS ON ". Expected tokens may include: "JOIN". SQLSTATE=42601
however when the same command is entered by the CLP it works just fine.
Command:
RUNSTATS ON TABLE DB2ADMIN.TEST_TABLE ON KEY COLUMNS WITH DISTRIBUTION AND SAMPLED DETAILED INDEXES ALL ALLOW WRITE ACCESS
Connection is via CLI .. sorry, missed that.
RUNSTATS is a CLP command and is not SQL statement.
To run this command in SqlDbx you need to use ADMIN_CMD procedure.
You can find details on how to use ADMIN_CMD in "Administrative Routines and Views" manual for DB2 for LUW
Offline
Many thanks for that, problem solved.
Can someone please give me an example of how to run a RUNSTATS command via SQLDBX ?????
==== www.solitairechamp.net ====
Last edited by alfredalfred (2016-05-26 08:44:15)
Offline
CALL SYSPROC.ADMIN_CMD ('RUNSTATS ON TABLE EMPLOYEE ON KEY COLUMNS and INDEXES ALL ')
Offline
Pages: 1