Can’t connect to local EPiServer database after upgrading to Windows 10 and Visual Studio 2015
After parental leave, vacation, upgrading to Windows 10 and getting Visual Studio 2015 up and running I thought it was safe to head back into the EPiServer waters.
Unfortunately my local database had been swallowed whole by the upgrade shark and my previously fantastic EPiServer site threw a YSOD in my face, complaining about the database connection.
The error message is in Swedish. Sorry. But it’s something something database connection something something Local Database Runtime.
I was rocking the localdb version of v11.0 (SQL Server Express 2012) in my connection string. The first attempt was to get this up and running.
That sure didn’t work. The event log complains about access rights to a system folder. Seemed like a trip down the rabbit hole. Staying well clear of that one.
What’s up SQL Server? Which versions are good to go then?
SQL Server Express 2014 reveals itself. It should just be a case of changing the connection string to use MSSQLLocalDB instead of v11.0, right?
Not quite apparently. The database needs to be upgraded to SQL Server Express 2014. We’ll do this by creating a new connection to the database.
Select Microsoft SQL Server as data source.
Set the server name to (LocalDB)\MSSQLLocalDB
This should upgrade your EPiServer database to be compatible with SQL Server Express 2014 and you should be good to go. You might have to remove the connection you created and restart Visual Studio, otherwise it’ll create two connections and complain that the first one is in use.
The lesson learnt is that with a fresh install of Windows 10 and Visual Studio 2015 you’ll probably be missing SQL Server Express 2012. Any EPiServer database connection that uses this version may fail. You’ll need to upgrade the database to SQL Server Express 2014 and change the connection string setting to use the 2014 version (MSSQLLocalDB) instead of 2012 (v11.0).