Walkthrough: Moving security data to a separate database

Abstract

How to move security data from the Core database to a separate Security database.

If you use Sitecore security on your Content Delivery (CD) server, you might want to optimize your setup by using a dedicated Security database. To do this, you must move the Sitecore membership objects from the Core database to a new database.

The Scripts for Sitecore Security database package that is available on the Sitecore download site helps you accomplish this. The batch files included in the package move Sitecore membership objects from the Core database to a dedicated Security database.

You can use an existing Security database or create a new Security database.

The package contains these batch files:

  • 0- create empty database (Optional).bat

  • 1- create security database tables.bat

  • 2- Migrate membership data from core database to security database.bat

  • 3- drop membership objects from core database.bat

Note

When you run each batch file, it prompts you to enter the SQL server name, database name, userid, and password needed for the procedure.

This walkthrough tells you how to:•

Create a Security database (optional)

If you do not have a Security database, you must create one. To create a new, empty Security database:

  • Run the 0- create empty database (Optional).bat batch file.

Note

The batch file only creates the database. It does not populate the database with tables, views, or stored procedures.

Create the Security database objects

The Security database must contain these objects:

image2.png

The objects include tables, views, and stored procedures related to membership data.

To create these membership objects in an empty Security database:

  • Run the 1- create security database tables.bat batch file.

Migrate membership data from the core database to the Security database

To copy the existing membership data from the Core database into the new Security database:

  • Run the 2- Migrate membership data from core database to security database.bat batch file.

Remove membership objects from the core database

To permanently remove the membership objects from the Core database:

  • Verify that the membership data has been correctly transferred to the Security database.

  • Run the 3- drop membership objects from core database.bat batch file to permanently remove the membership objects from the Core database.

Update the Security connection string

To update the connection to the Security database:

  • In the connectionstrings.config file, update the security connection string to point to the Security database.