一 根据此命令导出全部需要进行统计的表
--导出runstats命令
SELECT 'runstats on table "' || trim(owner)||'"."'||tabNAME || '"with distribution and detailed indexes all;'
from syscat.tables WHERE tabschema=' ' and owner=''
二 根据次命令导出需要进行export数据的表
--导出export命令
SELECT 'EXPORT TO '||tabNAME || '.IXF MESSAGES exp.log SELECT * FROM '||tabNAME ||' ;'
from syscat.tables WHERE tabschema=' ' and owner=''