IBM Tivoli Composite Application Manager for Application Diagnostics, Version 7.1.0.1
IBM DB2 database
Perform certain maintenance on ITCAM for Application Diagnostics's database to optimize database performance. This maintenance includes:
- RUNSTATS: this optimizes IBM DB2 for most efficient queries, etc.
- REORGCHK: run this on the REQUEST table, because it has a clustered index.
- REORG: this reclaims space but typically does not have to be run frequently. Consult your DBA for the right timing, etc. Typically, run this more frequently for large databases and when databases have been operational for extended periods of time.
To perform maintenance on the database:
- Logon to the amuser ID on the IBM DB2 server and enter the following commands (or schedule the commands to run under the amuser ID):
- Connect to the database: Syntax:
db2 connect to octigate- The run-stat-cmds.sh script runs the RUNSTATS command against the necessary tables in the ITCAM database and is used to optimize the IBM DB2 database performance.Frequency: Run run-stat-cmds.sh daily. This is recommended for all sizes of databases.Syntax: From MS_home/bin,
sh run-stat-cmds.sh database_name jdbc_user jdbc_passwordThe database_name for the Managing Server will be octigate.If the database is on a remote server, copy run-stat-cmds.sh and setenv.sh from MS_home/bin to the database server. Check JDBC_USER, JDBC_PASSWORD and JDBC_DRIVER_JAR properties in setenv.sh are correct before running the script.
- Because the REQUEST table has a clustered index, it is recommended to run the REORGCHK command against the REQUEST table.Frequency: Run REORGCHK weekly against the REQUEST table.Syntax:
db2 "REORGCHK CURRENT STATISTICS ON TABLE AMUSER.REQUEST"- Monitor the output of the REORGCHK command to see if the cluster ratio of the index falls below 90%. When this happens, ask your DBA to schedule a REORG on table REQUEST.Frequency: Run REORG when cluster ratio of the index falls below 90% for the REQUEST table. This will take TIME and CONSUME RESOURCES - run it on the weekend or during off-peak hours. Syntax:
db2 "REORG TABLE AMUSER.REQUEST INDEX R_TIME"
Parent topic:
Additional database maintenance