September 27, 2005 at 9:54 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 10:23 pm
Hi ,
Have u run RESTORE VERIFYONLY on the database file to verify integrity.
See BOL for correct syntex.
Hope this helps.
From
Killer
An apple a Day keeps error away.
September 28, 2005 at 5:54 am
Hello
Was the db detached (or properly split mirrored) when the backup was taken? This is probably the only way to get a usable backup of the actual log "device" file.
Are you trying to attach a log backup file as the log file? That won't work.
Perhaps you could give a timeline of events leading up to this situation as to what and how things were backed up. Then we take it from there.
jg
September 28, 2005 at 8:25 am
Hi,
Actually we did not have any backup of this database..... but I was able to overcome this problem. Step1: rename database and log files used by this database "Statistic".
Step2: Create database "Statistic" with the original files names and location.
Step3: Stop SQL server
Step4: Delete database and log files used by "statistic" database
Step5: Rename back files changed in step1 to their original names.
Step5: restart SQL server
and it started working...
September 28, 2005 at 8:29 am
Restore verifyonly is used to verify backup files not database files.... I wanted to attach database ...Thanks for your help
September 28, 2005 at 11:42 am
Just a silly question ... are you now going to start practicing the 'religious rites' of 'backup' ?
RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."
September 28, 2005 at 2:40 pm
Well I wish I could have had enough disk space to backup 5TB of data (I have only 500 GB to run my backups...) ......go figure
Thanks a lot......
September 29, 2005 at 7:15 am
hi,
is the database marked as (failed)?
if yes, you can set the database to emergency mode and use dbcc rebuild_log to rebuild a proper logfile... (for the correct syntax search this site for rebuild_log)
regards karl
Best regards
karl
September 29, 2005 at 7:28 am
Thanks,
It was my last step after I attached db... At first I did not see my database at all and I could not attached it at all. After I did my trick I saw db marked as suspect... Then I set the database to emergency mode and use dbcc rebuild_log .......
thanks for your help
Darek
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply