HCL Workload Automation, Version 9.4

Reorganizing the DB2 database

About this task

Using this tool, the database physically reorganizes the data tables and indexes, optimizing disk space usage and ease of data access. The process is time-consuming, requires that the database is backed up, and that HCL Workload Automation is stopped. However, at the end you have a database that is completely reorganized.

To reorganize the database follow this procedure:
  1. Back up the HCL Workload Automation database. Use the method described in Backing up the database to offline storage.
  2. Stop WebSphere Application Server and appservman by running the following command:
    conman "stopappserver;wait"
    See Starting and stopping the application server and appservman for full details.
  3. Check that the user who is going to run the procedure has the appropriate rights (see User permissions for running the DB2 tools)
  4. Open a DB2® shell, as follows:
    UNIX
    Follow these steps:
    1. Issue the command su - db2inst1, or change to the subdirectory sqllib of the home directory of the owner of the DB2 instance (by default db2inst1)
    2. Launch the command . ./db2profile
    Windows
    Select from the Start menu, ProgramsIBM DB2Command Line ToolsCommand Window
  5. Check that the command shell is correctly initialized by issuing the command db2, and checking that the command is recognized.
  6. Issue the command quit to leave the DB2 Processor mode.
  7. From within the shell, change to the directory <TWA_home>/TWS/dbtools7db27scripts for master domain managers, or to the directory <TWA_home>/TDWB/dbtools7db27scripts for dynamic domain managers.
  8. Run the script:
    UNIX
    dbreorg.sh database [user [password]]
    Windows
    dbreorg database [user [password]]
    where:
    database
    The name of the database:
    • If you are running this from the computer where the DB2 server is installed, the installed default name is TWS. Supply this value unless you have changed it.
    • If you are running this from the computer where the DB2 client is installed, the installed default name is TWS_DB. Supply this value unless you have changed it.
    user
    The DB2 administration user. If this is omitted the ID of the user running the command will be used.
    password
    The password of the DB2 administration user. If this is omitted it will be requested interactively.

    The script runs, giving you various messages denoting its progress and successful conclusion.

  9. Restart WebSphere Application Server and appservman by running the following command:
    conman "startappserver;wait"
    See Starting and stopping the application server and appservman for full details.