How do I change the database provider in Orchard?
Asked Answered
C

3

7

After doing a test install of Orchard 1.0, I've decided I want to use regular SQL Server instead of SQLCE. How do I change the provider? And, how do I re-run the database setup?

Colloidal answered 16/1, 2011 at 21:19 Comment(0)
G
16

Best thing to do is to delete all files from under your App_Data folder in Orchard.Web, this way you can start fresh :)

Gemmule answered 16/1, 2011 at 21:45 Comment(0)
P
6

Edit app_data\default\settings.txt.

Prichard answered 17/1, 2011 at 5:18 Comment(0)
G
2

You should change the settings.txt, located in App_Data\Sites\Default.

In this file, the connectionstring and provider is stored as plain text, like so:

Name: Default
DataProvider: SqlServer
DataConnectionString: Data Source=server;Initial Catalog=dbname;User Id=username;Password=password;

If you are using the SqlCe DataProvider, the connectionstring will be null. Change it to the appropriate connectionstring and change the DataProvider to SqlServer. Once this is changed correctly, you'll be able to use the supplied SQL Server.

To migrate the data from SQL CE, I've used this VS2010 plugin as you can't connect to those DB's yet out of the box: http://visualstudiogallery.msdn.microsoft.com/0e313dfd-be80-4afb-b5e9-6e74d369f7a1/

Hope it'll be of any use to you as deleting the App_Data folder will give you a lot more work.

Geronto answered 29/1, 2011 at 14:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.