Could not open FCB for invalid file ID %d in database ‘%.*ls’.

Details
Product: SQL Server
Event ID: 5180
Source: MSSQLServer
Version: 8.0
Component: SQL Engine
Message: Could not open FCB for invalid file ID %d in database ‘%.*ls’.
   
Explanation
The locations of all the files in a database are recorded in both the master database and the primary file for the database. You will see the above error if the information stored in the primary file points to a secondary data file or a log file that does not exist or to a secondary file or a log file whose header information does not indicate it is part of the same database as the primary file.

The specified file may be corrupted.

Often this error occurs because one or more log files associated with a database has been deleted in an attempt to shrink the log. Deleting the log file is not a supported method to shrink the log. For more information about the supported way to shrink the transaction log, see Microsoft Knowledge Base article 272318.

   
User Action
Follow these steps:

  • Verify that the specified file is not on a compressed volume. For more information about compressed volumes, see Microsoft Knowledge Base 231347.
  • Verify that the specified file is not corrupted.

If you see this error when you try to replace, restore, or attach a database:

  • Verify that you have specified the correct physical file name.
  • Verify that the path to each physical file matches the path stored in the primary file.
  • Verify that all files specified belong to the same physical database.
  • If the specified file has been copied from another location, verify that the copy completed with no errors.

If you see this error in the SQL Server error log after your database has been marked suspect:

  • Verify that the file specified in the message still exists in the expected location.
  • Verify that there is available disk space on the drive where the file resides.
  • Restore the specified file and/or the entire database from a known good backup.

For additional help to resolve this error, contact Microsoft Product Support Services.

Related:

Leave a Reply