An "Error 9008 (error executing SQL command)" Error Occurs When Migrating Multi-Page Documents.

February 19, 2009 | KB: 1012162
Laserfiche Server - Team (MSDE) 8, Laserfiche Server - United (MS SQL) 8, Laserfiche Server - United (Oracle) 8

Summary

In certain situations, when migrating documents with multiple pages to a different volume, you may receive the following error message:

    9008 (error executing SQL command)

In the Windows Event Viewer, you will see an error message similar to the following example:

    Database statement execution error encountered. Session ID: 14; Dialog ID: 573; Repository: 'MyRepository'; CLI routine: SysEntryMigrate; Message: [Microsoft][SQL Native Client][SQL Server]Violation of UNIQUE KEY constraint 'doc_tocid_storeid_unq'. Cannot insert duplicate key in object 'dbo.doc'.; SQL Statement: 'update doc set storeid = ? where tocid = ? and page_id = ? '; SQL variable: ''; SQL State: 23000.

Resolution 1

This issue is resolved in Laserfiche 8.1 and later. Please upgrade to the latest version of Laserfiche.

Resolution 2

There is a hotfix available for Laserfiche Server 8.0.2. The fix includes the following files:

  • lfs.exe (version 8.0.2.835)
  • cr.dll (version 8.0.2.835)
  • ms-upg3.sql
  • ora-upg3.sql

To update Laserfiche Server 8.0.2

  1. Stop the Laserfiche Server 8 service.
  2. Click one of the following links to download either the 32-bit or the 64-bit version of the hotfix.
  3. Hotfix_SCR44650_win32.zip

    Hotfix_SCR44650_x64.zip

  4. Replace your existing version of lfs.exe and cr.dll with the updated versions included in the zip file. The files are located in the Laserfiche Server installation folder. By default, the installation folder is "C:\Program Files\Laserfiche\Server."
  5. Copy the two .sql files into the sql subfolder located in the Laserfiche Server installation folder. By default, the path is "C:\Program Files\Laserfiche\Server\sql."
  6. Start the Laserfiche Server 8 service.