Search code examples
importsql-server-2008-r2upgradesql-server-2014

Import from SQL Server folder from previous version


Over the weekend my corporate PC got patched (without warning!) and my instance of SQL Server 2008 R2 was removed leaving behind it's MSSQL\DATA folder containing the .mdf and .ldf files.

I am now installing SQL Server 2014 (we still run Win 7 so cannot go to 2016).

Is it possible to import and upgrade all the old databases into SQL Server 2014?

I am aware that I can attach the existing files but that leaves them in the old MSSQL10_50.MSSQLSERVER folder.

Is it simply a case of moving the files to the MSSQL12.MSSQLSERVER folder, attaching, and then changing the Compatibility Level?


Solution

  • Yes, you should be able to just simply attach the existing .mdf files and update the compatibility level and be done with it :-)

    Going from an older version of SQL Server (2008 R2 in your case) to a newer one (2014) should never really be a problem (unless you wait too long to upgrade - you cannot go from 2000 to 2014 directly anymore).

    The other way around never works - you can never go from a newer version (e.g. your 2014) back to an older one - there's just simply no way to do this (other than scripting our your database structure and contents into SQL files and running those against the other instance)