grenade
grenade

Reputation: 32169

Migrate from SQLCE 4 to SQL Server 2008

So, being an early adopter, I have developed an application based on SQLCE4, ASP.Net MVC3 and Entity Framework CTP5 (code first) based on a fit of recklessness induced by reading this announcement.

Now the application is moving into production and we need to lose the ce in favour of SQL Server 2008 and later azure.

Scott Gu mentioned that tooling would be out soon to support such migrations but I wonder if we're too early to take advantage of an easy route.

Anyone done it? Is there a simple migration path? Something like the MDF create script option in Visual Studio?

Upvotes: 3

Views: 4639

Answers (3)

Oliver
Oliver

Reputation: 9518

I've followed the instructions from this blog post by ErikEJ and the migration was simple and successfull using only three steps:

  1. ExportSQLCE.exe "Data Source=D:\Orchard.sdf;" OrchardSqlCe.sql
  2. sqlcmd.exe -S .\SQLEXPRESS -Q "CREATE DATABASE Orchard"
  3. sqlcmd.exe -S .\SQLEXPRESS –d Orchard -i OrchardSqlCe.sql

ExportSqlCe is a tool written by the same ErikEJ which exports both schema and data to a text file.

Upvotes: 0

Korayem
Korayem

Reputation: 12507

You can do so using Webmatrix too

Here's a good explanation: http://www.sarasota.me/blog/migrate-orchard-database-sql-server-ce-to-sql-server-webmatrix

Upvotes: 2

Mitch Wheat
Mitch Wheat

Reputation: 300827

Have you looked at SQL Server Compact Toolbox and SQL Compact data and schema script utility on codeplex?

It allows you to script schema and data to a .sql file, which can be used in any context. It also scripts DML for use in SSMS scripts.

You can use the resulting script for documentation, programmatic scripting of SQL Compact database files, or migration of schema and data to SQL Server (Express) 2005 or later

Upvotes: 8

Related Questions