Search code examples
sql-serversql-server-cedatabase-restore

Restore Compact Edition .SDF into Standard Edition


EDIT : It turned out that this can only be done through an external tool like this tool thanks to ErikEJ answer.

But it can't be automated through a SQL Job or SSIS Import Package till the moment of writing.

The situation might be different in future/recesnt SQL Editions I am using SQL Server 2008 Standard.

The Question :

Is there a way to restore Compact Edition .SDF into Standard Edition So far I tried this

use [master]
go
restore filelistonly from disk='C:\113\DB_Files\file.sdf'
go

It gives this

Msg 3241, Level 16, State 0, Line 1 The media family on device 'C:\113\DB_Files\file.sdf' is incorrectly formed. SQL Server cannot process this media family. Msg 3013, Level 16, State 1, Line 1 RESTORE FILELIST is terminating abnormally.


Solution

  • You cannot "restore", but you can migrate using some of my tools for example: http://erikej.blogspot.dk/2012/02/migrating-databases-between-sql-server.html