0

Ive been working on some stuff with Visual Studio 2008, and SQL 2008 aswell.. Then i opened the project on another computer with 2012 version.

And now when im trying to work with the files in 2008 again, i cant open my database.mdf, becouse the 2012 sql has upgraded my database file...

Anything i can do to save it? (Btw. the data aint that important, but more the whole table setup and relations)

Christian Bekker
  • 1,857
  • 4
  • 27
  • 43

1 Answers1

0

Install 2012 SQL Server Express with Management tools, attach the MDF and extract the schema by generating "create" scripts for the objects you want using the wizard, then re-run the scripts on the new 2008 DB, don't think there's a way to downgrade. See here.
Or you can just keep developing on top of SQL2012, shouldn't be a problem even if you use visual studio 2008.

MaximR
  • 279
  • 2
  • 8
  • DDL/generate create scripts, hwo would do i do that? Btw. what package would be enough to perform the task: http://www.microsoft.com/en-us/download/details.aspx?id=29062 – Christian Bekker Nov 08 '12 at 01:09
  • In SQL 2012 Server Management Studio, in Object Explorer, expand Databases, right-click a database, point to Tasks, and then click Generate Scripts. See this thread http://dba.stackexchange.com/questions/20588/restore-sql-server-2012-backup-to-a-sql-server-2008-database – MaximR Nov 08 '12 at 01:10
  • So i need the managment studio for 2012 only? or still need to install sql server 2012 aswell? – Christian Bekker Nov 08 '12 at 01:13
  • Right, so you can install SQL2012 Express, it is freely downloadable from Microsoft. You're going to need both server and the mgmt tools. – MaximR Nov 08 '12 at 01:14