0

When creating a new ASP.NET MVC application in VS2010 you get Account (Simple Membership Database) database in SQL Server Express format.

Since I have problems with database migration / configuration on my remote host I decided to switch to SQL Server CE.

Question: how can I migrate from SQL Server Express to SQL Server CE? Tried to re-create tables from SQL Server Express in SQL Server CE but my approach to create names starting with 'dbo.' i.e. failed (used CompactView software)

CREATE TABLE [dbo].[webpages_UsersInRoles]
(
    [UserId] [int] NOT NULL,
    [RoleId] [int] NOT NULL
);

So I created tables without 'dbo.' and it does not work.

Question: what is the best approach to migrate a simple membership database from SQL Server Express to SQL Server CE?

Question2: Is migration from SQL Server Express to SQLite easy?

Thank you!

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Jacek Wojcik
  • 1,223
  • 2
  • 19
  • 33
  • Instead of `[dbo].[webpages_UsersInRoles]` I used `[dbo.webpages_UsersInRoles]` and managed to create tables. It did not solve the exception raised by `SimpleMembershipInitializer` – Jacek Wojcik Dec 28 '14 at 18:55
  • Maybe you can use my old Tool here http://sqlcemembership.codeplex.com/ - will create the database file and tables for you – ErikEJ Dec 29 '14 at 06:40
  • Thank you ErikEJ, I think that my problem was probably based on the fact that I tried to `WebSecurity.InitializeDatabaseConnection` to database which was already connected by another database context. Now I have two databases, one for my data and another for SimpleMembership – Jacek Wojcik Dec 29 '14 at 13:02

0 Answers0