Symptoms
When you restore a Microsoft SQL Server 2008 database from a sequence of transaction log backups, the SQL Server 2008 database is corrupted. However, the original SQL Server 2008 database from which you backed up the transaction logs is not corrupted. When this issue occurs, the following event is logged:
Filestream corruption – missing files, error 7904.
The corruption is detected on a database that was restored from a sequence of backup logs. The original database does not seem to be corrupted.
7904162
Table error: The filestream file for “FileID” was not found.
Resolution
This issue occurs because a race condition occurs between skipped files that should be backed up by a later transaction log backup.
When a file is in an active transaction, a log sequence number is assigned to the file in the createLSN column.The log sequence number in the createLSN column is less than the log sequence number in the lastLSN column of the transaction log backup. However, the FSLOG entry is not recorded in the $FSLOG folder in time for the file to be marked “skipped” by the current transaction log backup. A later transaction log backup process does not back up the skipped file. Therefore, a broken log chain occurs.