Question & Answer
Question
How do I determine when runstats last ran on a Tivoli Storage Manager database table.
Cause
Performance may be affected if runstats is not current especially on the larger tables like Backup_Objects.
Answer
Issue the following select from DB2:
db2 "select stats_time,SUBSTR(TABNAME,1,40) from syscat.tables where tabsChema='TSMDB1' AND stats_time is not null order by stats_time"
Note:
To issue DB2 commands from UNIX or AIX - as the instance owner:
cd /opt/tivoli/tsm/db2/bin
set db2instance=server1 (assumes default server name - change if yours is different)
db2 connect to TSMDB1 (assumes default DB name - change if yours is different)
db2 set schema TSMDB1 (assumes default DB name - change if yours is different)
then issue the above command.
To issue DB2 commands from Windows - log in as the DB2 instance owner:
From a windows command prompt issue command "db2cmd"
The db2 command window will pop up in a new window.
db2 connect to TSMDB1 (assumes default DB name - change if yours is different)
db2 set schema TSMDB1 (assumes default DB name - change if yours is different)
The output will look similar to the following:
STATS_TIME 2
-------------------------- ----------------------------------------
2012-03-08-23.34.50.354474 CLIENT_EVENTRULES <---- last run on March 8 2012
2012-03-09-00.34.50.869158 CLIENTOPT_MEMBERS
2012-03-09-02.34.51.890412 CLIENT_OPTIONSET
2012-03-09-05.34.53.384635 ADM_SSL_KEYRING
...(snipped for brevity)
2012-11-07-01.41.04.566972 SERVER_CONNECT_INFO
2012-11-07-01.41.04.813068 DF_MIGRBITFILES
2012-11-07-01.41.05.619488 ACTIVITY_LOG
2012-11-07-01.41.05.798333 GLOBAL_ATTRIBUTES
2012-11-07-01.41.06.148028 AF_VOL_CLUSTERS
2012-11-07-05.07.06.309308 BACKUP_OBJECTS <---- last run on November 7 2012
The date and time in the STATS_TIME column provide the last time runstats was completed.
Product Synonym
TSM ITSM ADSM IBM Spectrum Protect
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
swg21616934