September 27, 2005 at 10:40 am
Hi,
I recently lost a disk array which affected many of the databases I manage. Several in particular only had the log device on the lost logical drive. The lost log file was “restored” and the database was attached specifying the new location for this file. Unfortunately, I received the following message:
Server: Msg 5172, Level 16, State 1, Line 1
The header for file 'file name' is not a valid database file header. The FGID property is incorrect.
The database had been created on the same SQL Server 2000 and was previously detatched. Is there any way to correct the FGID property in the header or a workaround to successfully attach this data
Any input would be greatly appreciated.
Darek …
September 27, 2005 at 12:12 pm
So, you lost the log file(s) but the data files were fine? Then you restored the log file and attempted to attach the database?
If by restored, you mean that you restored the log files from a backup, this won't work. If you were able to recover the files from the array, it should work, unless the files are corrupted.
If you can't get the log files back, the best option is probably to try sp_attach_single_file_db, although this is designed to work for databases that have been cleanly shut down or detached, it may still work if there were no uncommitted transactions since the last checkpoint. If that still doesn't work, you will have to restore the last backup and apply any subsequent log backups that you have.
HTH
/*****************
If most people are not willing to see the difficulty, this is mainly because, consciously or unconsciously, they assume that it will be they who will settle these questions for the others, and because they are convinced of their own capacity to do this. -Friedrich August von Hayek
*****************/
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply