SQL Server Q&A

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘transaction log’

BUG: Recovery of database logical file names might fail after a RESTORE operation

Symptoms
When you restore a database, recovery of logical file names of the database can fail, and the logical file names that correspond to the database in the master..sysaltfiles and the <Database_name>..sysfiles tables may differ.
Resolution
When you perform a backup and restore operation with a database that is in full recovery mode, this problem occurs if you modify the logical file names in the database after you back up the database but before you back up the transaction log.

FIX: Event ID 7904 is logged, and the SQL Server 2008 database is corrupted when you restore a SQL Server 2008 database from a sequence of transaction log backups

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.