An "8000: Unknown error." Error Occurs When Logging in to a Repository.

May 12, 2014 | KB: 1000451
Laserfiche 6

Summary

When you log in to a repository, you may receive the following error message:

    8000: Unknown error

Cause

There are a number of causes for this particular error and they are listed as follows:

  1. Stored procedures were not updated after upgrading the Laserfiche Server. See Resolution 1.
  2. One or more expansion databases have not been attached. See Resolution 2.

Resolution 1

The Laserfiche Server uses stored procedures to access database data. This issue may arise when the stored procedures do not get updated after upgrading the Laserfiche Server.

To update stored procedures using a VBScript:

  1. Click here to download the script.
  2. Save Version2.vbs file to a temporary directory.
  3. Double-click on the Version2.vbs file to begin running the script.
  4. From the first Laserfiche dialog box, type the name of the computer where the SQL Server resides. Click OK.

    Note: If you are using Laserfiche Team (Group), then you should append the following to the computer name: \Laserfiche.

  5. From the second Laserfiche dialog box, type in the name of the SQL database associated with the Laserfiche repository in question. Typically, the SQL database name is the same as the Laserfiche repository name. Click OK.
  6. Click "Yes" when asked to update.
  7. Restart the Laserfiche for Microsoft SQL Server service.

This script resets the current stored procedure version number to "1." Restarting the Laserfiche Server will now automatically update the stored procedures.

Note: In rare situations, when upgrading Laserfiche Server, running the Version2 VBScript and restarting the Laserfiche Server will not successfully update the stored procedures. This situation will only arise on a Laserfiche Server using the full version of Microsoft SQL Server. See the following workaround to manually populate the stored procedures.

Workaround for Resolution 1

This workaround applies when upgrading to Laserfiche Server 6.11 or 6.12. This workaround should only be attempted if Resolution 1 fails to update the Laserfiche stored procedures. Manually populate the Laserfiche stored procedures into the appropriate SQL tables by running two SQL scripts in the Microsoft SQL Server Query Analyzer.

Download the appropriate SQL scripts:

  1. Click here to download a zip file containing the necessary scripts.
  2. Extract the contents of 61x_SP_Update.zip to a temporary folder.

Use "Wipe LFSPs.txt" to remove any Laserfiche stored procedures:

  1. Click Start and then select All Programs.
  2. Select Microsoft SQL Server and click Query Analyzer.
  3. Open the "Wipe LFSPs.txt" file you extracted from the previously downloaded zip file.
  4. Select and copy all of the text in the file.
  5. Paste the text into the Query window of the Query Analyzer.
  6. From the Query menu, click Execute.

Use "611 update SPs.SQL" or "612 update SPs.SQL"to create the Laserfiche stored procedures:

  1. Click Start and then select All Programs.
  2. Select Microsoft SQL Server and click Query Analyzer.
  3. Perform one of the following:
    • For Laserfiche Server 6.11: Use a text editor to open the "611 update SPs.SQL" file from the previously downloaded zip file.
    • For Laserfiche Server 6.12: Use a text editor to open the "612 update SPs.SQL" file from the previously downloaded zip file.
  4. Select and copy all of the text in the file.
  5. Make sure the Query window is blank and paste the text into the Query window of the Query Analyzer.
  6. From the Query menu, click Execute.

Manually reset the Laserfiche Stored Procedures version number and execute one final query:

  1. Click Start and then select All Programs.
  2. Select Microsoft SQL Server and click Query Analyzer.
  3. Perform one of the following:
    • For Laserfiche Server 6.11 Make sure the Query window is blank and type the following in the Query window of the Query Analyzer:

      Update DBOptions set OptionValue='660' where OptionName='Stored Procedure Version'
      exec lfsp_grant_all_to_lf

    • For Laserfiche Server 6.12 Make sure the Query window is blank and type the following in the Query window of the Query Analyzer:

      Update DBOptions set OptionValue='665' where OptionName='Stored Procedure Version'
      exec lfsp_grant_all_to_lf

  4. From the Query menu, click Execute.

Resolution 2

This issue may also arise when an expansion database has not been attached. This section demonstrates two methods (VBScript and OSQL) through which you may attach expansion databases.

To attach expansion databases using a VBScript file:

  1. Click here and here to download the necesssary script files.
  2. Run ListSqlDbs.vbs by double-clicking it. This script is designed to find SQL databases with similar names.
    1. From the first Laserfiche dialog box, type ServerName\Laserfiche. The term ServerName represents the name of the computer where the SQL server resides. Click OK.

      Note: If you upgraded Laserfiche Team (Group) to Laserfiche United (Standard\Enterprise), then you should only specify the name of the computer where the SQL server resides.

    2. From the second Laserfiche dialog box, type in the name of the SQL database associated with the Laserfiche repository in question. Typically, the SQL database name is the same as the Laserfiche repository name. Click OK.
    3. A message box will post a list of SQL databases. Take note of all the databases that end in "_Data_n" where n stands for a sequential number.
    4. Compare what is listed to the .mdf files in the database directory.
    5. Use the following script to attach the unattached databases.
  3. Run AttachDbs.vbs by double-clicking it. This script is designed to attach SQL databases.
    1. From the first Laserfiche dialog box, type ServerName\Laserfiche. The term ServerName represents the name of the computer where the SQL server resides. Click OK.

      Note: If you upgraded Laserfiche Team (Group) to Laserfiche United (Standard\Enterprise), then you should only specify the name of the computer where the SQL server resides.

    2. From the second Laserfiche dialog box, type in the name of the SQL database that you would like to attach.
    3. Type in the full path and filename for the specified database. Click OK.
  4. Repeat step 5 as needed for any additional expansion databases.

To attach the expansion database using the OSQL command line utility:

  1. Start the OSQL utility by opening a Windows command prompt.
    1. Click Start.
    2. Select Run to load the Run dialog box.
    3. Under the "Open" option, type the following line:

      cmd

    4. Click OK.
  2. At the command prompt, type the following line:

    osql -E -S Computer Name\Laserfiche

  3. Get the filenames for your databases by typing the following three lines at the OSQL prompt:

    USE master
    SELECT * FROM sysdatabases
    GO

  4. Write down the databases that are displayed.
  5. Compare what is listed to the files in the database directory.
  6. Attach each database by typing the following in the command prompt:

    EXEC sp_attach_db 'Database Name_data_1', 'C:\Path to Database Directory\Database Name_data_1.mdf'
    GO

  7. Repeat step 6 as needed for any additional expansion databases.
  8. Type EXIT to close the program.