Troubleshooting: The updatedb utility fails at execution of RunSQLFile target

The updatedb utility can fail during execution of the RunSQLFile target when a previous invocation of the updatedb utility was terminated abnormally. It can also fail during application of a database change through the RunSQLFile target. Depending on the symptoms that are shown at the time of failure, the solutions that are detailed in this topic can help resolve the problem.

Problem

Updatedb fails because the database was partially updated from the previous invocation. After the updatedb utility fails, look for one of the following errors in the updatedb.log file in the WC_installdir/logs/update directory:

Oracle
ORA-00955: name is already used by an existing object
ORA-01408: such column list already indexed
For IBM i OS operating systemDB2
[SQL0601] name in schema type *FILE already exists.
Where:
  • name is name of the object you are attempting to create.
  • schema is the name of the database schema in which you are trying to create the object name.

If you see any of these errors, you can resolve the issue with either method that is described in the Solution section,

Solution

Undo the changes that are generating the error and rerun the updatedb utility. For example, if the utility fails due to duplicate tables, drop the duplicate tables and rerun the utility.

Alternatively, although not recommended, use the RunSQLFileOnErrorContinue target or explicitly set the attribute onError="continue". The RunSQLFileOnErrorContinue target sets the onError attribute to "continue", which skips errors and continues with the database update.

Fix the error using one of the following methods:
  • A local solution that addresses only the error that caused the build of the Ant task that is called by the utility to fail.
  • A global solution that addresses not only the errors that are shown in the Problem section, but also any other errors. For a global solution, you modify the updatedb configuration file.
Local solution:
  1. Using the information in the updatedb.log file, identify the line in the Ant XML build file where failure of the RunSQLFile target occurred.
  2. Back up the Ant XML build file that you identified in Step 1.
  3. In the Ant XML build file, modify the call to the RunSQLFile target at the failing line, to call the RunSQLFileOnErrorContinue target instead.
  4. Rerun the updatedb utility.
Global solution: Update the updatedb configuration file to set the onError attribute to "continue".
  1. Back up the file WC_installdir/components/Fixpack/xml/configureDatabaseFixpack.xml
  2. In the file WC_installdir/components/Fixpack/xml/configureDatabaseFixpack.xml, locate the following line:
    <target name="RunSQLFile" depends="PropCheck" if="fileExist">
  3. Locate the closing </target> tag that corresponds to the <target> tag you found in Step 2.
  4. Remove all lines in between the opening and closing <target> tags.
  5. Insert this line between the opening and closing <target> tags:
    <antcall target="RunSQLFileOnErrorContinue" />
  6. Rerun the updatedb utility.