My scenario
I tried creating a new database schema for my Episerver website that uses the createDatabaseSchema=”true” on the episerver.framework config node. This creates a new database schema if it detects there’s none for the database specified in the config. However, when I first ran my Episerver website which was configured to an empty database, I got the following error:
Solution
Run the following scripts:
- %systemroot%\Microsoft.NET\Framework64\v4.0.30319\SQL\en\SqlPersistenceService_Schema.sql
- %systemroot%\Microsoft.NET\Framework64\v4.0.30319\SQL\en\SqlPersistenceService_Logic.sql
- [your site installation folder]\packages\EPiServer.CMS.Core.7.7.1\tools\EPiServer.Cms.Core.sql
Please note the third script above can be taken from the NuGet package installed on your website’s packages. If you don’t have this, you can create an empty Episerver website in Visual Studio using the Episerver templates which will create a packages folder that contains this script.
References
Dan Matthews blog: http://world.episerver.com/blogs/Dan-Matthews/Dates/2014/10/Database-failures-when-creating-a-site-in-Visual-Studio/