Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Execute RUNSTATS on all the DB2 tables

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
maverick05

New User


Joined: 14 Apr 2005
Posts: 54
Location: Earth

PostPosted: Wed Jun 06, 2012 10:26 pm    Post subject: Execute RUNSTATS on all the DB2 tables
Reply with quote

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
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1754
Location: Bloomington, IL

PostPosted: Wed Jun 06, 2012 10:37 pm    Post subject:
Reply with quote

  1. Use a suitable product (i.e.PL/I or Rexx with encapsulated SQL) to read the SYSDATABASE table and fabricate suitable control cards.
  2. Submit one or more jobs using these control cards.
  3. Hi, Opal!
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1534
Location: Andromeda Galaxy

PostPosted: Wed Jun 06, 2012 11:03 pm    Post subject:
Reply with quote

How about LISTDEF + RUNSTATS??
Back to top
View user's profile Send private message
maverick05

New User


Joined: 14 Apr 2005
Posts: 54
Location: Earth

PostPosted: Wed Jun 06, 2012 11:48 pm    Post subject: Reply to: RUNSTATS
Reply with quote

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
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1534
Location: Andromeda Galaxy

PostPosted: Thu Jun 07, 2012 12:48 am    Post subject:
Reply with quote

Google listdef for examples
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2038
Location: Silicon Valley

PostPosted: Sat Jun 09, 2012 2:25 am    Post subject: Reply to: Execute RUNSTATS on all the DB2 tables
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts To know activities on db2 tables ashek15 DB2 4 Fri Mar 03, 2017 11:23 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts ERM-Diagram of SysIBM-Catalog-Tables Auryn DB2 2 Fri Feb 17, 2017 6:22 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us