SAP Online Portal

Latest SAP News, Solutions, Error Codes, Help Files, Jobs, Documentations, Articles

How to check and run db2 table statistics on sap system

Case

You want to check and update db2 statistics of an SAP System.

Solution

1) Find last statistics run of table for example T000. Execute following command as db2<sid>:

db2 “select STATS_TIME from syscat.tables where tabname=’T000′”

2) Execute runstat:

At first find db-owner:

db2 “select tabschema, tabname from syscat.tables where tabname like ‘%USR02%'”

If it yields SAPSR3, execute following command:

db2 “runstats on table SAPR3.T000 with DISTRIBUTION and detailed indexes all”

3) If you want to to run statistics for all table use dmdb6srp tool

dmdb6srp -n <SID> -t ALL

 

One thought on “How to check and run db2 table statistics on sap system

Leave a Reply

Your email address will not be published.

Related topics

Install non-unicode system from unicode CDs

Case You want to install a non unicode sap system ECC6. For this, you need ECC6 SR2 installation CDs, which are not available in Sapnet […]

How to check and run db2 table statistics on sap system

Case You want to check and update db2 statistics of an SAP System. Solution 1) Find last statistics run of table for example T000. Execute […]

How to lock unlock SDCCN

You want to lock or unlock SDCCN In SE38 run report /BDL/SETUP  (BDLSETUP) with the following parameters: KEY = LOCKED VALUE = space(unlock) oder X […]

Delete source systems in RSA1 after BW system copy

Case  You want to delete all source systems in BW system after a system copy Solution  1. Go to Transaction SE16 – table RSBASIDOC to […]

saposcol file owner and permissions

Case In order to be able to start saposcol successfully, you have to adapt its owner and file permissions properly Solution OS level, for example […]