Use the provided script to gather statistics about DB2
® database table usage. Run the scripts nightly using the DB2
Task Center, for example, to update internal statistics used by DB2
. Up-to-date statistics are necessary for proper performance. This procedure is relevant for DB2
databases only. Oracle and SQL Server gather statistics automatically.
About this task
You can collect statistics while IBM
® Connections is running and in use. However, it is best to schedule statistic collection to run on a regular basis during off-peak hours using a tool such as DB2
To gather DB2
database statistics, complete the following steps:
- Copy the statistics script named runstats.sql to the root directory of the application database for which you want to gather statistics. The script is stored in the following subdirectory of the IBM Connections installation files:
- AIX® or Linux®:
- Microsoft® Windows®:
Log into the database server using an ID that has administrative privileges.
Open a command prompt, and then change to the directory to which you copied the script.
Use the following command to run the application scripts:
is the script file storage directory of the application for which you are compacting the database. Choose one of the following subdirectories:
Parent topic: Maintaining application databases
- For Activities, Blogs, Communities, and Forums:
db2 -td@ -vf runstats.sql
- For Bookmarks and Profiles:
- For Home page:
- For Files and Wikis:
db2 -td@ -vf updateStats.sql