IBM Support

Checking for the last time a runstats was run against the database.

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.

[{"Product":{"code":"SSVJJU","label":"IBM Security Directory Server"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"6.1;6.2;6.3;6.3.1;6.4","Edition":"","Line of Business":{"code":"LOB24","label":"Security Software"}}]

Document Information

Modified date:
16 June 2018

UID

swg21270455