Troubleshooting
Problem
This technote shows how to check when the last time a db2 runstats was run against an Directory Server backend database. Running runstats regularly against an Directory Server backend DB2 database is an important part of maintaining performance.
Resolving The Problem
Run the following SQL as the DB2 instance owner user:
UNIX or Linux:
db2 connect to <ldap_db>
db2 -v "select substr(tabname,1,30),card,stats_time from syscat.tables"
db2 connect reset
Windows:
1. Start a db2cmd.exe window by typing 'db2cmd' in the Windows run dialog
2. Run the following SQL:
db2 connect to <ldap_db>
db2 -v "select substr(tabname,1,30),card,stats_time from syscat.tables"
db2 connect reset
For example:
db2 connect to ldapdb2
db2 -v "select substr(tabname,1,30),card,stats_time from syscat.tables" > last_stats.out
db2 connect reset
Then review the timestamps for the last time statistics was compiled for the tables, or send the last_stats.out file to Support, if they requested it.
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21270455