Sample: Setting up the Data Load utility

Before running the Data Load utility for the first time, configure the store and database environment settings.


About this sample

This sample works with the following values in the environment configuration file:


Defining the environment settings

  1. Open a the Utility server Docker container..

  2. Open the Data Load environment wc-dataload-env.xml configuration file in the appropriate directory:

  3. Change the values of the business context attributes inside the <_config:BusinessContext> element to match the store settings:For example:

      <_config:DataLoadEnvConfiguration
      	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      	xsi:schemaLocation="http://www.ibm.com/xmlns/prod/commerce/foundation/config 
                                 ../../../xml/config/xsd/wc-dataload-env.xsd" 
      	xmlns:_config="http://www.ibm.com/xmlns/prod/commerce/foundation/config">
      	<_config:BusinessContext storeIdentifier="Aurora" catalogIdentifier="Aurora" 
      		languageId="-1" currency="USD">
      
      </_config:BusinessContext>

  4. (DB2) (Oracle) Encrypt the password of the database user:

    1. Open the command-line interface and go to the following directory:

    2. Enter the following command:

      • (Linux) ./wcs_encrypt.sh db_password

      • (Developer) wcs_encrypt.bat db_password

      Where db_password is the password for the database user.

    3. Use the encrypted password next to ASCII encrypted string as the value for the password attribute inside the <_config:Database> element.

    Note: For security, the password should be encrypted when specified inside of the configuration file.

  5. Change the attribute values inside the <_config:Database> element to match the database environment.

      <_config:Database type="db2" name="name" user="user" password="password" 
      server="server" port="port" schema="schema" />

    Where:

      type
      db2 or oracle

      name
      The name of the database

      user
      The database user ID.

      password
      The database password is necessary to connect to the database. For security purposes, the password is always encrypted. If the password field is empty, we are prompted to enter the password on the command line when you run the utility.

      server
      The name of the server the database is on. The server name can be the IP address or the fully qualified DNS name of the server the database is on.

      port
      The port to connect to the database.

      schema
      The name of the database schema.

  6. Save and close the configuration file.

  7. The Aurora starter store uses the non-ATP inventory system by default. If you instead want to use the ATP inventory system, run the following SQL statement:

    Where storeIdentifier is the external identifier for the store, for example Aurora.