Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I had a disk failure, and I'm trying to restore my MSSQL DB. I seem to be missing the MDF file associated with the DB ( Some other older MDFs are available).

The only backup scheme is a full ntbackup dump monthly, and a daily incremental. Does ntbackup pick up the MDF files? I can't find them in my BKFs!

Am I totally screwed?

Thanks.

share|improve this question
    
ntbackup should be using the SQLVDI to do backups, which means that even if the SQL server data files are excluded from the backup, they should still be backed up if the SQL Service is triggered for backup. You can read more here –  Mark Henderson Jul 20 '11 at 23:00
    
I lucked out... VSS was on and the MDFs were in a different location ( different installation of MSSQL on same machine ). Thanks for info. –  lrrrgg Jul 21 '11 at 2:08

2 Answers 2

up vote 0 down vote accepted

If the SQL Server is shutdown during the backup, you should have the MDF's. You might also have them if VSS was enabled. Otherwise, they are possibly lost - the MDF (and associated LDF) are kept open by SQL Server so ntbackup can't gain exclusive access to it.

If you have the SQL Agent performing backups to a disk-file, you may be able to locate the corresponding BAK file and perform a restore from that.

share|improve this answer

The MDF/LDF files are always open by MSSQL, so a straight ntbackup run won't be able to read them. You'll need to set up a maintenance plan within MSSQL to run a periodic backup of both the database and transaction logs (if you need point-in-time recovery), or enable the VSS Writer service (it's not enabled by default prior to MSSQL 2008) to enable Volume Shadow support, which would then allow ntbackup to get the MDF/LDF (but you can't do a point-in-time restore with those.)

In your case, after the fact, you're (sadly) probably out of luck.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.