Separating the contact management database on MVC sites

When using contact management on high‑traffic websites, the system needs to store a very large volume of data in order to keep records of all contacts, their activities and other related information. Kentico allows you to to move all tables and database objects associated with contact management to a separate database (including the currently stored data). Doing so allows easier management of the application’s main database, without the need to deal with the contact data.

There can only be one separated contact management database for the entire system, even when hosting multiple websites. It is not possible to create a different database for each site.

If you wish to separate the contact management database, follow the steps listed in the Running the database separation section.

Warning

  • It is strongly recommended to back up your database before starting the separation.
  • The database will be unavailable while the separation is being carried out, so you should run the process at a time when no visitors or editors are accessing the websites in the system.
  • You cannot perform database separation if you use Integrated Windows authentication on your SQL Server.

Please note the difference for separating the database on MVC projects:

Separating database on MVC projects

When the process of separating the database is completed, you need to add an additional connection string for the new contact management database to your MVC project’s web.config file: <add name=“CMSOMConnectionString” connectionString=“…” />.

After having separated the contact management database, all functionality of the website and administration interface remains the same as before the separation.

Rejoining the contact management database on MVC sites

If you wish to reverse the process and return everything back to a single database, follow the instructions in Rejoining the contact management database. Please note the difference for rejoining the database on MVC projects:

Rejoining database on MVC projects

When the process of rejoining the database is completed, you need to delete the additional connection string for the separated contact management database from your MVC project’s web.config file: <add name=“CMSOMConnectionString” connectionString=“…” />.