Gathering DB2® database statistics daily
Use the scripts that are provided with IBM Connections to gather statistics about DB2® database usage.
About this task
This procedure is relevant for DB2® databases only. Oracle and SQL Server databases gather statistics automatically.
To gather DB2® database statistics, complete the following steps:
Procedure
- 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 directory:
- AIX® or Linux®:/Lotus_Connections_Install/connections.sql/ application_subdirectory/db2
- Microsoft® Windows®:\Lotus_Connections_Install\connections.sql\ application_subdirectory\db2
where application_subdirectory is the script file storage directory of the application for which you are compacting the database. Choose one of the following subdirectories:- activities
- blogs
- communities
- dogear
- files
- forum
- homepage
- metrics
- mobile
- news
- oauth provider
- profiles
- search
- wikis
- Log into the database server with 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:
- For Activities, Blogs, Bookmarks, Communities, Forums, Mobile, and Profiles: db2 -td@ -vf runstats.sql
- For Calendar: db2 -td@ -vf calendar-runstats.sql
- For Files, Home page, Metrics, Wikis, and Push Notification: db2 -td@ -vf updateStats.sql