Friday , April 19 2024

Script To Gather Statistics On Table and Indexes On DB2

 

RUNSTATS utility perform statistics in DB2. Should be perform Weekly or Monthly basis.

Following Script helps to gather statistics on all tables excluding XML columns and there associated indexes . Output will be emailed.

First, it will generate the RUNSTATS command-line output into [/dbawork/runstats.out], then same output file will be executed with command-line db2 -tvf 

Script can be modified as per your need.

Script tested on created on AIX 7.1 (Bash) DB2 V 10.5.

Required Input

Provide schema name in query

Define email Id’s to mailgroup.

Loading

About Syed Naveed Raza

I have experience to manage DB2 & Oracle plus 3 year of experience as Temenos T24 Core Administrator on AIX & IBM Integration Bus 10.

Leave a Reply

Your email address will not be published. Required fields are marked *

Categories