views:

2931

answers:

3

I have 4 SQL Server 2005 db's that I want to move to SQL CE. I know I cannot keep the SProcs,Views, and Functions(Differences Between SQL Server Compact and SQL Server) but I would like to keep everything else.

I have tried this app, SQL Server to SQL Server Compact Edition Database Copy but it errors out on me. I have the source and am looking into it but I thought I'd check and make sure I wasn't over complicating the solution to my ACTUAL goal.

Is there a simple, can be one shot, way of converting standard SQL .mdf to SQL CE .sdf?

Right now my best idea is to set up Replication to the SQL CE from the SQL 2005 Standard.

A: 

What if you scripted the objects from 2005 and ran the script in CE? That'd give you the structure of the DB, then you could select/insert?

I haven't tried this, but what about SQL's DB export/import tools in management studio?

n8wrl
Most of the script objects from SSMS don't run in SQL CE due to their use of things like sys tables. You can't use the tools in SSMS either.
Jason Short
+2  A: 

1.Use SQL Server to SQL Server Compact Edition Database Copy with sqlcompact 3.1 or 3.0 not sql compact 3.5 You can use a virtual machine like sun virtual box, install sql compact 3 or 3.1 on it, and convert your database inside it

2.You can convert to sql compact manually

emdadgar2
A: 

Use the SDFViewer utility:

go Tools Menu > From SQL Server

Enough said....

Khaled Abdo