How to use the installutil recreateindexes command

The installutil recreateindexes command recreates indexes in a HCL Compass user database. This command can be used when indexes are lost or foreign key constraints are broken. This command will recreate indexes on the built-in tables as well as any tables for user defined record types.

The syntax for this command is:

installutil recreateindexes <dbset_name> <user_db_name> <username> <password> [-dropall] [-print]

There are two command options: -dropall and -print. The -dropall option will first drop the indexes before recreating them. Using -dropall may take a long time, depending on how many records are in the database. The -print option will just print the commands that would be executed.

If there is an error during the execution of the command, the -print option can be used to generate a listing of the pdsql commands without actually executing them. This output can be inspected to find the exact command that is failing which will help diagnose the problem. The commands for a particular table can be extracted from that output and executed individually to fix problems with just one table. The output can be captured in a script file and executed later (after editing to remove the command banner output).

Here is an example:

installutil recreateindexes 8.0.0 SAMPL admin "" -print