Try our conversational search powered by Generative AI!

How to create clean EPiServer 8 database?

Vote:
 

Hello

Now when deployment center is no longer available (?) how are we supposed to create empty SQL databases for new sites?

The command Update-EPiDatabase is used when upgrading versions via nuget, but is there a command for creating a new database from scratch?

Cheers
/Fredrik

#121175
May 04, 2015 16:42
Vote:
 

My way of doing this might not be best practice but I sttill use Deployment Center, what wil happen when this is gone I have no idea, but for now it is working.

Install empty db from deployment center, 7.5

Run Update-EpiDatabase from within an empty project.

Thats it.

When installing a new project from VS you will also get an empty database but you will need to restore the files as a db in sql server.

#121179
May 04, 2015 17:32
Vote:
 

Create new site in VS Extensions, don't choose to import Alloy stuff - instead, create an empty site. You may wondering what would I do with .mdf file under App_Data? Just attach as database in SQL Server - and you are all set.

#121210
May 04, 2015 21:09
Vote:
 

I do like Valdis say. It works great.

#121213
May 04, 2015 21:30
Vote:
 

And since we are repeating our self.. I was exactly what I said with the last sentence i my previous post ;)

#121237
May 05, 2015 13:46
Vote:
 

Just a quick update on this one. As of 8.8 we have a new cmdlet "Initialize-EPiDatabase". This allows you to install a new EPiServer database into an empty database.

See more: http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-CMS/8/Deployment/About-the-database/

David

#122861
Jun 16, 2015 17:20
Vote:
 

oh, that's nice.

#122921
Jun 17, 2015 19:25
Vote:
 

Like others said

I sometimes start with the MDF-file from an empty Alloy db like Valdis said but typically download the database from the GitHub repo

https://github.com/episerver/alloy-mvc-template/tree/master/build/database

Place it in App_Data and use the following connectionstring

<add name="EPiServerDB" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|Alloy.mdf;Initial Catalog=Alloy;Connection Timeout=60;Integrated Security=True;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />

and run the Initialize-EPiDatabase command from the Package Manager Console

If you are missing the MDF-file simply create a new using Visual Studio, create a new item and select the SQL Server Database, when created run the Initialize-Epidatabase command

#190212
Edited, Apr 04, 2018 23:03
Vote:
 

The actual SQL script with the CMS database schema is bundled in the EPiServer.CMS.Core package. You can find it in the package under /tools/EPiServer.CMS.Core.sql

So you can e.g. create a new empty database in SQL Managment studio and execute the script on the database.

Another options is to set atttribute 'createDatabaseSchema=true' on the episerver.framework element in web.config (it will not create the actual database but will install the schema if the connection string points to an database without the cms schema)

#190226
Edited, Apr 05, 2018 12:07
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.