views:

63

answers:

3

I have created an .SDF file and inserted data into the SDF database file on a mobile device. I want to transform .SDF file to a SQL Server 2008 Database File but don't know how. Any pointers or suggestions would be appreciated.

A: 

You cannot directly convert a SQL Compact database into a full SQL Server 2008 database, as they are structured completely different. And as far as I know you cannot use SSIS (SQL Server Integration Services) to copy data from the SQL Compact database to a SQL Server database (the other way round would be possible).

So the only real option seems to write some app that reads the data from the SQL Compact database and then inserts it into the SQL Server.

tomlog
any samples for that one .....
Ashok
Have a look at this article for some example code on how to read data from the SQL Compact db: http://msdn.microsoft.com/en-us/library/aa226134%28SQL.80%29.aspx.Once you have the data in a DataSet you can just loop through it and insert the data of each record into your SQL Server db using the usual methods from the System.Data.SqlClient namespace.
tomlog
A: 

Try RDA

Mehmet AVŞAR
That probably would not work with an existing SQL Compact database if it was not setup with RDA in the first place.
tomlog
Detailed sample for RDA
Ashok
A: 

You can use http://exportsqlce.codeplex.com to script the database and run the script against a SQL Server database.

ErikEJ