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:
- Stop WebSphere Application Server Liberty Base and appservman by running the
following command:
See Starting and stopping the application server and appservman for full details.conman "stopappserver;wait"
- Back up the HCL Workload Automation database. Follow the instructions in the database vendor documentation, as appropriate.
- Check that the user who is going to run the procedure has the appropriate rights (see User permissions for running the DB2 tools)
- On the DB2 server where you copied the script, open a DB2®
shell, as follows:
- UNIX™
- Follow these steps:
- 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)
- Launch the command . ./db2profile
- Windows™
- Select from the Start menu, Programs →; IBM DB2 →; Command Line Tools →; Command Window
- Check that the command shell is correctly initialized by issuing the command db2, and checking that the command is recognized.
- Issue the command quit to leave the DB2® Processor mode.
- From within the shell, browse to the directory where you copied the script.
- Run the script:
- UNIX™
- dbreorg.sh database [user [password]]
- Windows™
- dbreorg database [user [password]]
where:- database
- The name of the database. The default name is TWS. 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.
- Restart WebSphere Application Server Liberty Base and appservman by running the
following command:
See Starting and stopping the application server and appservman for full details.conman "startappserver;wait"