sql-serversql-server-cemdfsdf

Converting MDF to SDF


I've done a bit of Googling trying to find out how to convert a .MDF file to a .SDF. There doesn't seem to be much around apart from an old article for something called 'SQL Server to SQL Server Compact Edition Database Copy Utility'. As this is so old, I doubt it will work with the newer versions of SQL Server databases. Is there a more established and official method of achieving this now? Ideally I need something that will migrate the data as well as the table structures.


Solution

  • You can use my free VS add-in "SQL Server Compact Toolbox" to migrate data and schema from a SQL Server database to SQL Server Compact via script or directly in the GUI