Concept - DBPrepare (valid to 7.10)

Table of Contents

Product Version

Product To Version





This document is valid from Intershop Commerce Management

DBPreprare is a tool for creating and updating the database schema objects and for preparing required database content of one or more cartridges. The DBPreprare tool recognizes prepared or up-to-date cartridges and their declared preparer steps. As a result of stored execution protocol for each cartridge, DBPreprare only needs to execute new preparer steps, resulting in a significantly reduced execution time. Additionally, DBPreprare initializes new cartridges, so explicit initialization of new cartridge is no longer required.

DBPrepare uses the declaration files of DBinit and DBmigrate and replaces the functionality of DBInit and DBMigrate.



This glossary describes the terms in this concept:




From a developer's perspective, a code container for implementation artifacts like templates, pipelines, Java code etc. that provide business logic or technical functionality to Intershop 7.

From a system administrator's perspective, a type of deployment component for implementation artifacts that provide business logic or technical functionality to Intershop 7.


A preparer implements a database initialization or migration processor. Both preparers are processed by DBPrepare to prepare the database content of one or more cartridges.

General Processing

There are three processing phases in the DBPrepare tools with the following processing order:

  1. Pre-processing

  2. Main-processing

  3. Post-processing

Each phase loops through the list of cartridges (the property cartridges.dbinit within

DBPrepare Cartridge Initialization

In case the initialization of a cartridge was not done before, the initialization process of the cartridge starts.

Each cartridge can contain an initialization declaration in:

  • Configuration file:


  • Each property in this file has the format:[pre.|post.]ClassN = Preparer [params]

    • N - floating point number support, >= 0 - example snippet of core cartridge

DBPrepare Cartridge Migration

In case the cartridge initialization is registered, the migration process of a cartridge starts.

Cartridge-specific preparer:

  • Configuration files:

    • Version-independent:

    • Version-dependent: migration-to-<version>.properties

  • Property: [pre.|post.]ClassN = Preparer [params]

    • N - floating point number support , >= 0

Migration Path:

  • The migration version path is calculated for each cartridge based on the migration-to-<version>.properties files.

The order of the migration files is calculated from the version part of the file name:

  • Version_1 , Version_2 , ... Version_n string should map to the corresponding file name

    • migration-to- ,

    • migration-to- ...

    • migration-to-


Resource Files

Initialization and migration preparer can use the same resources and classes as the application server. To avoid resource conflicts, we recommend using the folder with the cartridge name under resources.

  • IS_SOURCE/<cartridge>/src/main/resources/<cartridge>/dbinit/data/<type_of_data>

SQL scripts:

  • IS_SOURCE/<cartridge>/src/main/resources/<cartridge>/dbinit/scripts


UUIDs are used to identify persistent objects inside a database table. In case DBPrepare creates new objects in the database, we recommend to use a predefined set of UUIDs to avoid conflicts or duplicated data during the replication process

The data replication feature requires the same UUID for the same object on edit and live system.

Use Cases

Operational Use Cases

It is highly recommended to avoid additional parameters for the DBprepare command.




Initialization of an empty database

./ -classic


Migration of database

./ -classic

Developer Use Cases





Initialization of a database (does not matter if empty or not)

./ -classic -cdb=yes


Migration of database

./ -classic


Filter execution to specific cartridges (you are able to verify the result)

./ -classic --cartridges=<CARTRIDGES>

./ -classic --cartridges=core,bc_foundation


Explicit run of a specific preparer (you are able to debug and restart already registered steps)

./ -classic --force-exec-id=<IDs>

./ -classic --force-exec-id=core:pre.Class1,xcs:Class1


Get additional command line options

./ --help

Registration and Protocol of DBPrepare Steps

Each execution step of DBPrepare is protocolized at PREPARATIONSTEP table. The following statement provides good insights into former executions:


The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

The Intershop Customer Portal uses only technically necessary cookies. We do not track visitors or have visitors tracked by 3rd parties. Please find further information on privacy in the Intershop Privacy Policy and Legal Notice.
Customer Support
Knowledge Base
Product Resources