1

Need some help in recreating a recovered database. We recently recovered an old disk drive that has the following folders on it:

Program Files\Microsoft SQL Server\MSSQL...

Program Files(x86)\Microsoft SQL Server\MSSQL...

And each directory seem to have a complete data of one of our old SQL servers, unfortunately I'm not sure what version or type of SQL server was used and I need to recreate a new instance that can run all these recovered files.

I'm very new to SQL administration and would like some assistance on what my approach should be here. I already tried installing 2012 SQL express and management studio and pointed the database data to the old folders and don't seem to work.

Thank you

3
  • 1
    1. If you'd not cut paths, the SQL Server version could be deduced from the folder name 2. Do you have any .mdf, .ldf files? if no, you have no "recovered databases"
    – sepupic
    Commented Apr 18 at 16:07
  • @sepupic Yes we have a lot. These are the correct paths: Program Files\Microsoft SQL Server\MSSQL10INSTANCENAME\MSSQL\DATA Program Files(x86)\Microsoft SQL Server\MSSQL10INSTANCENAME\MSSQL\DATA I see master, model, tempdb, along with 10 others we used before.
    – Patrick
    Commented Apr 18 at 17:11
  • 1
    >>>MSSQL10 --> SQL Server 2008, 2012 is also good, you can attach these databases to any version above. What do you mean by "pointed the database data", did you try to use ATTACH (via SSMS or create database for attach)? Check here pls learn.microsoft.com/en-us/sql/relational-databases/databases/…
    – sepupic
    Commented Apr 18 at 18:33

1 Answer 1

0

Just looking at an MDF file, there's no way to be sure which version of SQL SErver it is. You could look at the create date for the files to at least ballpark a version. However, your best bet may be to just get the latest version of SQL Server and hope for the best.

You can use the ATTACH DATABASE command to get loose MDF files and put them back into a server. Here is the documentation on how that works. When you attach the database, it will be automatically upgraded to the newest version of SQL Server, so, just in case, keep a copy of those MDF files.

It's possible you'll get an error that the MDF file in question is too old to put on the latest version of SQL Server. It'll likely tell you what version the MDF file is. You'll then need to go back to an older version of SQL Server. However, you don't have to go all the way back to whatever version this may be.

Otherwise, best of luck. After recovering these databases, might I suggest you invest time in learning how to do backups and restores and automate the process? That way, if everything goes away again, you've got a simpler mechanism for recovery.

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