A "Cannot find row in sysindexes for database ID" Error Occurs When Attaching Or Restoring A Microsoft SQL Server Database.

September 24, 2012 | KB: 1013052
Laserfiche 7, Laserfiche 8

Summary

When attaching or restoring a Microsoft SQL Server database, you may receive an error message similar to the following message:

    Cannot find row in sysindexes for database ID5, object ID1

Cause

There may be a version mismatch between the database and the SQL Server instance you are using. If you have a backup (.bak) of the database, you use the following command to check the version of the backup file.

To verify the version of a .bak file

  1. Use the following command on the back up file:

    RESTORE HEADERONLY FROM DISK = 'c:\temp\MyLFDB.bak'

    Replace the sample path with the appropriate value.

  2. Look for the values of the following three columns:
    • SoftwareVersionMajor
    • SoftwareVersionMinor
    • SoftwareVersionBuild

Compare the values with the version of the SQL Server instance.

See the following Knowledge Base article for how to determine the version of a Microsoft SQL Server instance.

1012925 Determining The Version Of Microsoft SQL Server.