Executing the RUNSTATS Command on IBM DB2 During the Pause Following New Repository Creation

This task is a step in Process of Meeting Requirements for an Incremental Repository Merge. Use this task to execute the RUNSTATS command on IBM DB2, or see your database administrator to have the command executed. The Upgrade Wizard pauses and notifies you to execute the RUNSTATS command and then resume. Execute RUNSTATS as described in the procedure that follows.

To execute the RUNSTATS command on IBM DB2

Unix operating systems:

Connect to the IBM DB2 command window and execute the following commands:

echo "select 'runstats on table ' concat rtrim(creator) concat '.' concat rtrim(Name) concat ' and detailed indexes all shrlevel change' concat ';' from sysibm.systables where type='T' and (name not in ('S_ESCL_LOG','S_DOCK_INIT_ITEM') and name not like ('S_DOCK_INITM_%')) order by name ;">DBname_tmp_runstats.sql 

Execute the resultant SQL in DBname_tmp_runstats.sql, which will look similar to the following:

db2 connect to db204205 user siebel using db2
db2 -tf DBname_tmp_runstats.sql | grep runstats | grep -v ^select > DB204205_runstats.sql
db2 -tf DB204205_runstats.sql
db2 terminate

Windows operating systems:

Connect to the IBM DB2 command window and execute the following command:

echo select 'runstats on table ' concat rtrim(creator) concat '.' concat rtrim(Name) concat ' and detailed indexes all shrlevel change' concat ';' from sysibm.systables where type='T' and (name not in ('S_ESCL_LOG','S_DOCK_INIT_ITEM') and name not like ('S_DOCK_INITM_%')) order by name ;>DBname_tmp_runstats.sql 

Execute the resultant SQL in DBname_tmp_runstats.sql, which will look similar to the following:

db2 connect to db204205 user siebel using db2 
db2 -tf DBname_tmp_runstats.sql | findstr runstats | findstr -v ^select > DB204205_runstats.sql
db2 -tf DB204205_runstats.sql 
db2 terminate