Repairing database indexes for all tables weekly

To reduce fragmentation, repair database indexes weekly for all tables.

This topic contains steps for Windows® and UNIX®

Windows

Procedure

  1. Log on to the database server as the Rational® Synergy administrator.
  2. Shut down database sessions and protect the database.
    1. Broadcast a shutdown message to the database users.

      > ccm message /database database_path "shutdown message"

    2. Show the database usage.

      > ccm monitor database_path

    3. Perform the shutdown.

      > ccmdb shutdown database_path

  3. Back up the database.

    > ccmdb backup database_path /to destination_dir

  4. Repair indexes for all tables.

    > ccmdb repair database_path /repair_index ""

  5. Unprotect the database.

    > ccmdb unprotect database_path

  6. Start a session in the ccm_admin role.

    > ccm start /nogui /r ccm_admin /d database_path

  7. Protect the database.

    > ccmdb protect database_path

  8. Check the database cache and archive.

    > ccm fs_check

    If the full ccm fs_check takes more time than your site can afford on a daily or weekly basis, you can run a reduced check. See ccm fs_check for information about options and arguments. Run a full ccm fs_check at least once a month.

  9. End your session.

    > ccm stop

  10. Unprotect the database, if the database is not corrupted.

    > ccmdb unprotect database_path

UNIX

Procedure

  1. Set user to ccm_root.
    $ su - ccm_root
    Password: *****
  2. Shut down database sessions and protect the database.
    1. Broadcast a shutdown message to the database users.

      $ ccm message -database database_path “shutdown message”

    2. Show the database usage.

      $ ccm monitor database_path

    3. Perform the shutdown.

      $ ccmdb shutdown database_path

  3. Back up the database.

    $ ccmdb backup database_path -to destination_dir

  4. Repair indexes for all tables.

    $ ccmdb repair database_path -repair_index ““

  5. Unprotect the database.

    $ ccmdb unprotect database_path

  6. Start a session in the ccm_admin role.

    $ ccm start -nogui -r ccm_admin -d database_path

  7. Protect the database.

    $ ccmdb protect database_path

  8. Check the database cache and archive.

    $ ccm fs_check

    If the full ccm fs_check takes more time than your site can afford on a daily or weekly basis, you can run a reduced check. Run a full ccm fs_check at least once a month.

    For more information about options and arguments, see:

    ccm fs_check

    ccm fs_check

  9. Clean the database cache.

    $ ccm clean_cache

  10. End your session.

    $ ccm stop

  11. Unprotect the database, if the database is not corrupted.

    $ ccmdb unprotect database_path


Feedback