Generating Initialization and Update Scripts

It is possible to generate SQL initialization and update scripts without executing them. It might be helpful for development purposes to have a preview of what you can expect after the update and recognize potential problems.

Context

The generated SQL init/update scripts can be found in the following files:

  • <HYBRIS_TEMP_DIR>/update_<TENANT>_schema.sql
  • <HYBRIS_TEMP_DIR>/update_<TENANT>_data.sql

Procedure

  • To generate update scripts, call ant updatesystem -DdryRun=true from the command line.
  • To generate init scripts, call ant initialize -DdryRun=true from the command line.
    The dryRun parameter set to true means that the scripts are generated but not executed.

Previewing and Downloading SQL Scripts

Using SAP Commerce Cloud Administration Console, you can easily generate and preview scripts directly on the web page.

Context

To preview and download the scripts:

Procedure

  1. Click on the Sql scripts button on the update page (under Platform tab).

    It takes you to the following page:

  2. Generate the scripts (for initialization or update, depending what option is choosen).

    After generating them, you see the following page:

    Here you can see the generated scripts directly on the web page or you can download them as a ZIP file.