Replacing sql ce with Sql server

Topics: Customizing Orchard, General
Oct 27, 2015 at 3:39 PM
I'm running against a version that's at least 2 years old (and no appetite for any migrations) and would like to swap out the native sql ce for sql 2008. SQL Lite Toolbox gives me a way to convert CE to sqlserver but I don't see where the ConnectionString is specified.

thx
Developer
Oct 28, 2015 at 1:04 PM
The connection string is to be specified in the Settings.txt file of your tenant (probably Default, see the App_Data/Sites folder). Example:

App_Data/Sites/Default/Settings.txt:
State: Running
Themes: 
Modules: 
Name: Default
DataProvider: SqlServer
DataConnectionString: (your connection string goes here)
DataTablePrefix: null
RequestUrlHost: null
RequestUrlPrefix: null
EncryptionAlgorithm: AES
EncryptionKey: ...
HashAlgorithm: HMACSHA256
HashKey: ...
Oct 30, 2015 at 11:32 AM
Edited Oct 30, 2015 at 9:28 PM
Thanks much! I've taken a swing at converting the default .sdf to an azure-based db by scripting data and schema (sqllite toolbox) and pasting the connection string offered by Azure's portal where form is:

Server=tcp:AzureServer.database.windows.net,1433;Database=DirSeries;User ID=myUser@AzureServer;Password=foo;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;

using:

DataProvider: SqlServer

But as long as the default .sdf is present (Orchard.sdf) the site serves. If I rename it to _Orchard.sdf the site tosses runtime error.

Perhaps a different Provider string is needed for an azure db?
Developer
Oct 30, 2015 at 10:13 PM
Could it be that you're changing the wrong Settings.txt file? For example, if you enabled the Azure Blob Storage Provider, Settings.txt is stored in blob storage, so the Settings.txt file on the physical hard drive is not being used.

In any case, make sure you delete the hrestart.txt file or recycle the application pool after changing Settings.txt in order for its changes to take effect.
Nov 2, 2015 at 6:39 AM
In any case, make sure you delete the hrestart.txt file or recycle the application pool after changing Settings.txt in order for its changes to take effect.
that did it -- thx