Improving access performance and defragmenting DB2 database data
Use the scripts provided with IBM Connections to improve access performance and reclaim fragmented space in the DB2 database data of an application database. This procedure is relevant for DB2 databases only. Oracle and SQL Server compact data automatically.
Before starting
The script that you run to improve access performance and reclaim the fragmented space of the database takes the database offline. To prepare the database to be taken offline, stop the WAS instances for each application that you plan to run the script on.
About this task
You do not need to run this script on the database frequently. It is recommended that you schedule this tasks during another maintenance task that requires you to take the application offline.
Procedure
- Copy the database compacting script named reorg.sql to the root directory of the application database for which you want to improve access performance. The scripts are stored in the following subdirectory of the IBM Connections installation files:
- 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 improving database access performance. Choose one of the following subdirectories:
- activities
- blogs
- communities
- dogear
- files
- forum
- homepage
- profiles
- wikis
Note: To improve access performance of the Communities discussion forum database, copy the reorg_forum.sql file from the communities subdirectory.
- From the WAS admin console, stop the servers hosting the applications hosting the databases. To do so...
- Log in to the WAS admin console as an administrator.
- Expand Servers -> Server Types, and then select WebSphere application servers.
- Select the check boxes beside the servers hosting the applications with the databases in which you want to improve access performance, and then click Stop.
- Log into the database server using an ID that has administrative privileges.
- Open a command prompt, and change to the directory to which you copied the script.
- Use the following command to run the application scripts:
- For Activities, Blogs, Communities, Forums, Files, and Wikis
db2 -td@ -vf reorg.sql
- :
- For Bookmarks, Home page, and Profiles:
db2 -tvf reorg.sql
- Restart the application servers by repeating Step 2, but selecting Start instead of Stop.
Parent topic
Maintaining application databases
});