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 you begin

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

  1. 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:

      Note: To improve access performance of the Communities discussion forum database, copy the reorg_forum.sql file from the communities subdirectory.

  2. From the WAS admin console, stop the servers hosting the applications hosting the databases. To do so...

    1. Log in to the WAS admin console as an administrator.

    2. Expand Servers -> Server Types, and then select WebSphere application servers.

    3. 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.

  3. Log into the database server using an ID that has administrative privileges.

  4. Open a command prompt, and change to the directory to which you copied the script.

  5. Use the following command to run the application scripts:

  6. Restart the application servers by repeating Step 2, but selecting Start instead of Stop.


Parent topic

Maintaining application databases


   

 

});