SaaS CMS has officially launched! Learn more now.

SQL Server Overview


Hi All.

New Year, New Job. I'm from a .Net/SQL Server development background, but have taken on a Web Content Manager's role at my new company. To what extent is it possible to interract directly with the underlying SQL Server database that sits behind EPiServer (we're using CMS 5). Are there any good web pages/documentation? I appreciate this is vague, and at this point I'm trying to get an overview.



Jan 05, 2011 15:00

The database isn't structured in a way that lends itself to direct modification or interaction therefore the general recommendation is to use the EPiServer API for any interaction with the database. 

You can find SDK documentation here

Jan 05, 2011 16:11

Thanks David

Jan 05, 2011 18:05

I'll have to object to that :) The EPi-database is fairly well-structured, normalized, pretty easy to read and understand. Also, there are tons of SPs that can be used. If you want to know what SPs are called when from the GUI, run Reflector on the corresponding page.

Of course, the API should be used as much as possible but there are certain tasks that is much more cumbersome to program (if not impossible - due to timeouts) through the API, such as bulk operations, lowercase all URLs, empty recycle bin with 10k pages, bulk-switch types on a large number of properties etc.

Jan 12, 2011 16:39

Thanks for the input Johan. I agree that database is reasonably well structured and that direct DB interaction is the only way for some things. However I since Guy said he was new to EPiServer I guessed he might want to insert or query "News" pages for example. This obviously isn't best achieved directly through the database. Another example is xforms data (specially since Guy is using EPiServer CMS 5) which are serialised in the database and can only be accessed through the API (without a lot of faffing anyway). 

Also EPiServer's official line is always to stay away from the database as much as possible, so was just passing on best practice advice :)

Jan 12, 2011 17:29

And not to forget: With the APIs you get caching, cache dependencies and purges and cache synchronization between servers.

Jan 12, 2011 19:44

Typically, if we need to mess with the DB, we run the scripts in conjunction with a release of the site (MSI), after which the site normally restarts anyway (and cache is updated). But sure, during development and testing of scripts, there are quite many iisresets ;-)

Edited, Jan 13, 2011 15:00
* 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.