A "There is already an index on table 'Doc' named 'IX_Doc_TocId'." Error Occurs When Upgrading a Repository for Use with Laserfiche 7.1.2.

November 17, 2005 | KB: 1011060
Server (MSDE) 7.1.x, Server (MSSQL) 7.1.x

Summary

When you use the Laserfiche Repository Upgrade Utility to upgrade a 7.1.x repository for use with Laserfiche 7.1.2, you may receive the following error message:

    There is already an index on table 'Doc' named 'IX_Doc_TocId'.

Cause

This error occurs when you are upgrading a repository that has been hotfixed using the SQL script hotfix described in the following Knowledge Base article:

1001049 Laserfiche is Unexpectedly Slow When Accessing Large Volumes.

The SQL script hotfix described in the Knowledge Base article creates the IX_Doc_TocId index. When upgrading a repository to Laserfiche 7.1.2, the Laserfiche Repository Upgrade Utility will also attempts to create this index. Because the index already exists, the process will fail. This issue may affect you in one of two ways:

  • You have attempted to upgrade your repository from version 7.1.x to version 7.1.2 and received the described error message. Please see Resolution 1.
  • You have not yet attempted to upgrade your repository from version 7.1.x to version 7.1.x. Please see Resolution 2.

Resolution 1

If the repository upgrade process failed with the described error message, there is a SQL script created specifically for this issue that will successfully complete the failed 7.1.x to 7.1.2 upgrade.

Note: The following procedure only successfully completes a failed 7.1.x to 7.1.2 upgrade if the process failed with the error message, "There is already an index on table 'Doc' named 'IX_Doc_TocId'." It does not complete migrations that may have failed for any other reason.

To complete a failed 7.1.x to 7.1.2 upgrade

  1. Click the following link to download a zip file containing the 712UpdateIndexHotfixFix.sql script:
    712UpdateIndexHotfixFix.zip
  2. Extract the contents of the archive to a temporary location.
  3. Click Start and then click Run.
  4. Type the following and press ENTER:

    cmd

  5. At the command prompt, type the following:

    osql -E -S ServerName -d "DatabaseName" -i "ScriptPath"

    where ServerName is the name of your SQL server, DatabaseName is the name of the SQL database associated with the Laserfiche repository you are upgrading, and ScriptPath is the full path (including the file name and extension) to the extracted 712UpdateIndexHotfixFix.sql file.
  6. Press ENTER.

Note: If you are using MSDE, this procedure only needs to be completed on the main SQL database; it is not necessary on expansion databases.

Resolution 2

If you have not yet run the 7.1.x to 7.1.2 upgrade process, you can prevent this issue from occurring by using an updated version of the MS711-712.sql upgrade script used by the Laserfiche Repository Upgrade Utility. This updated version will check for the presence of the index before attempting to create it. Replace the existing MS711-712.sql script with the updated MS711-712.sql script (last modified on November 17, 2005).

Note: This file must be replaced before beginning the repository upgrade process. If you previously attempted the repository upgrade process and received the given error message, please see Resolution 1

To replace MS711-712.sql with the updated version

  1. After installing Laserfiche 7.1.2, do not run the Laserfiche Repository Upgrade Utility.
  2. Click the following link to download a new version of the MS711-712.sql script:
    MS711-712.zip
  3. Extract the contents of the archive to a temporary location.
  4. Replace the existing MS711-712.sql script located in the UPGLFRP subfolder of the Server installation folder (default location: C:\Program Files\Laserfiche\Server\UPGLFRP) with the version included in the zip file.
  5. Upgrade your repository from 7.1.x to 7.1.2 by running the Laserfiche Repository Upgrade Utility.