Running the Content Data Store creation script

Create a Content Data Store using PowerShell if you use Windows.

About this task

By default, this script also creates the State Store in the same database, by creating the State Store database tables as well. This is convenient for a demo or test environment.

In a production environment, you can choose to create the State Store in its own database instead (for example, to improve performance), by removing the State Store table creation commands from this script, and running the Install Deployer State Store.ps1 script separately.

Procedure

  1. If you do not want to create the State Store database tables in the same database as the Content Data Store, and you want to create an Oracle Content Data Store, do the following:
    1. Navigate to Database\Oracle\.
    2. Open Install Content Data Store.ps1 for editing.
    3. Comment out the following lines:
      Invoke-OracleScript (Join-Path -path $PSScriptDir -childpath '..\Scripts\Oracle\Create\DP_STATE_TABLES.sql') "Inserting Deployer State Store Tables"
      Invoke-OracleScript (Join-Path -path $PSScriptDir -childpath '..\Scripts\Oracle\Create\DP_STATE_CONSTRAINTS.sql') "Inserting  Deployer State Store Constraints"
      Invoke-OracleScript (Join-Path -path $PSScriptDir -childpath '..\Scripts\Oracle\Create\DP_STATE_INDEXES.sql') "Inserting Deployer State Store Indexes"
      Invoke-OracleScript (Join-Path -path $PSScriptDir -childpath '..\Scripts\Oracle\Shared\85\DP_STATE_SET_VERSION.sql') "Sets the Broker database version."
    4. Save and close Install Content Data Store.ps1.
    5. After completing the current task, install the State Store database separately.
  2. If you do not want to create the State Store database tables in the same database as the Content Data Store, and you want to create a Content Data Store that is not Oracle, do the following:
    1. Navigate to Database\MSSQL\.
    2. Open Install Content Data Store.ps1 for editing.
    3. Comment out the following lines:
      Invoke-MsSqlScript (Join-Path -path $PSScriptDir -childpath '..\Scripts\MSSQL\Create\DP_STATE_TABLES.sql') "Inserting Deployer State Store Tables"
      Invoke-MsSqlScript (Join-Path -path $PSScriptDir -childpath '..\Scripts\MSSQL\Create\DP_STATE_CONSTRAINTS.sql') "Inserting Deployer State Store Constraints"
      Invoke-MsSqlScript (Join-Path -path $PSScriptDir -childpath '..\Scripts\MSSQL\Create\DP_STATE_INDEXES.sql') "Creating Deployer State Store indexes"
    4. Also comment out the following line:
      Invoke-MsSqlScript (Join-Path -path $PSScriptDir -childpath '..\Scripts\MSSQL\Shared\85\DP_STATE_SET_VERSION.sql') "Sets the State Store database version"
    5. Save and close Install Content Data Store.ps1.
    6. After completing the current task, install the State Store database separately.
  3. Open Windows PowerShell from the Windows Start Menu.
  4. In PowerShell, depending on your database navigate to one of the following folders on the installation media:
    • For a Microsoft SQL Server, AWS RDS-MSSQL or Microsoft Azure database, navigate to Database\MSSQL\
    • For an Oracle database, navigate to Database\Oracle\
  5. Type the following command:
    & '.\Install Content Data Store.ps1' 

Results

You have created the Content Data Store, as well as the State Store, if you left the script as it was.

What to do next

When installing a Role, you configure the Content Data Store in the Storage Layer configuration file.