For runstats all you can also use
REORGCHK UPDATE STATISTICS
command, its similar to what dollar489 SQL is generating (without distribution and detailed indexes).
For reorg all just rewrite this sql with reorg command.
Regards,
Adam AC
Quote:
Originally posted by dollar489
Write an sql like this to generate a script and just run it:
SELECT 'RUNSTATS ON TABLE ' || TABSCHEMA || '.' || TABNAME || ' WITH DISTRIBUTION AND DETAILED INDEXES ALL ; '
FROM SYSCAT.TABLES
WHERE TYPE = 'T'
AND TABSCHEMA = 'YOURSCHEMA'
;
You can change any option in the SQL above and customize for your use.
HTH
dollar
|