Orchard CMS Development Changing to LocalDB

Tags: OrchardCMS, LocalDB, SQL Server

This week I wanted to play around with the theme for my website (Finally) but to do this I had to finish setting up my development environment. Just recently I have swapped over to running Windows 8 and Visual Studio 2012, but one choice I did make this time is that I was not going to install the SQL Server Engine on my local Dev Machine, I am planning on using the HyperV inside Windows 8.

As I wanted to get some work done quickly and no worry about building the new server I decided to swap over the Orchard CMS environment so that it would now use the LocalDB Instance on my desktop.

I was surprised at how easy it was…

image

Inside the Orchard CMS Website project all I had to do was browse to the App_Data Directory, then to the Sites and Default directory. Inside this directory there is a Settings.txt file. This file holds the connection string information for the database the site uses. To swap it over all I had to do was change the connection string to the new LocalDB Format.

image

DataConnectionString: Data Source=(localdb)\v11.0;Integrated Security=true;AttachDbFileName=C:\Projects\OrchardCMS_Backup_PreUpgrade\orchard.mdf;

Once done a simple refresh of the browser for the site and I am good to go.

1 Comment

  • Allan said

    I am not sure where you're getting your information, but good topic. I needs to spend some time learning much more or understanding more. Thanks for wonderful info I was looking for this info for my mission.

Add a Comment

brisbanedating