How to change the database provider in Orchard?

After completing a test installation of Orchard 1.0, I decided to use regular SQL Server instead of SQLCE. How to change the supplier? And how do I rerun the database setup?

+7
source share
3 answers

It’s best to delete all files from the App_Data folder in Orchard.Web, so you can start a new job :)

+16
source

Modify the app_data \ default \ settings.txt file.

+6
source

You must modify the settings.txt file located in App_Data \ Sites \ Default.

In this file, the connection string and provider are stored in plain text, for example:

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

If you use SqlCe DataProvider, the connection string will be null. Change it to the corresponding connection string and change the DataProvider to SqlServer. Once this is correctly changed, you can use the provided SQL Server.

To transfer data from SQL CE, I used this VS2010 plugin, since you cannot connect to these databases from the box: http://visualstudiogallery.msdn.microsoft.com/0e313dfd-be80-4afb-b5e9-6e74d369f7a1/

I hope this will be useful for you, as deleting the App_Data folder will give you much more work.

+2
source

All Articles