View previous topic :: View next topic
|
Author |
Message |
maverick05
New User
Joined: 14 Apr 2005 Posts: 54 Location: Earth
|
|
|
|
Partitoned table spaces always have 1 table each.
How to execute RUNSTATS on all the Db2 tables present in all table spaces in a database at once? |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
- Use a suitable product (i.e.PL/I or Rexx with encapsulated SQL) to read the SYSDATABASE table and fabricate suitable control cards.
- Submit one or more jobs using these control cards.
- Hi, Opal!
|
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
How about LISTDEF + RUNSTATS?? |
|
Back to top |
|
|
maverick05
New User
Joined: 14 Apr 2005 Posts: 54 Location: Earth
|
|
|
|
I saw that option but not comfortable with that.So do you list the database name in LISt option?
RUNSTATS TABLESPACE
LIST RUNSTATS_DATABASENAME
TABLE (ALL) INDEX (ALL KEYCARD)
UPDATE ALL
REPORT YES
SHRLEVEL REFERENCE |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Google listdef for examples |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
You need to have two statements:
1. LISTDEF which specifies the tablespace name. Use the PARTLEVEL keyword, with no partition number specified. You need to specify a name for the LISTDEF so you can refer to it later, for example MYLISTS
2. on RUNSTATS specify LIST MYLISTS. |
|
Back to top |
|
|
|