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'm helping a friend try and restore a SQL Server database. The hard drive crashed that had his Server 2003, SQL Server 2005 and databases on it. So far he has reinstalled Server 2003 Enterprise and has the MDF and LDF files from the database.

How can I tell which updates were applied to the server hard drive that crashed? We still have the hard drive that crashed, and can attach it as an external USB drive using a USB enclosure, we just can't boot off the old hard drive. I'm trying to get the new SQL server install on the same patch/update level as the old so I can attach the mdf and ldf files and get this up and running again.

Are there any log files on the crashed drive we can access to find out which version/patch/updates of SQL Server they were using before?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

You don't need to have the new server at the same patch level in order to reattach a user database, it's only the system databases for which you need to worry about patch level and even then it's just better to rebuild the new server keeping its own system databases. As long as you're using the same edition of SQL Server on the new install you can reattach a user database just fine.

share|improve this answer
    
Thanks for clearing that up. I rebuilt the server and installed a new sql server 2005. When I try to attach the MDF/LDF file I get the following error: The header for file '_log.LDF' is not a valid database file header. The PageAudit property is incorrect. (Microsoft SQL Server, Error: 5172). This is a vanilla SQL Server 2005 install. No service packs yet. Should I install the service packs first? –  drpcken Aug 8 '10 at 17:16
    
@drpcken No, unfortunately that sounds like a different problem that service packing isn't going to avoid. Did you make sure to browse to the appropriate place where log file is and give it a name when you tried to reattach? Also, what recovery model was your database in on the old server? –  squillman Aug 8 '10 at 17:30
    
Well I just found out the original was an Express edition and the friend I am helping installed SQL Server 2005 (full). I'm going to try installing express and get it up to date and try to attach them to that instance instead. I'm not sure what the old model was (wasn't my database, I'm just helping). I'm guessing it was FULL though because the LDF file is 90 gigs :( –  drpcken Aug 8 '10 at 17:35
    
Yeah, give that a try. I'm guessing you're right about the recovery model :) If it still doesn't go you might be dealing with corruption of your log file... –  squillman Aug 8 '10 at 18:10
    
i had to end up making a new db with the same name, stopping sql services and overwriting the newly created mdf with the old mdf. Everything seems to be working now. Thank you! –  drpcken Aug 8 '10 at 19:41
show 2 more comments

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.