Sample: Setting up the Data Load utility

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

About this sample

This sample sets the following default values in the environment configuration file:
  • Store - Madisons starter store
  • Language - English (-1)
  • Currency - United States dollar (USD)
  • Database type - Derby
  • Inventory type - non-ATP or ATP
Change any of these values (except inventory type) as needed to match the values of your existing environment and store.

Defining the environment settings

  1. Open the Data Load environment wc-dataload-env.xml configuration file in the appropriate directory:
    • WebSphere Commerce EnterpriseWebSphere Commerce - ExpressWebSphere Commerce ProfessionalWC_installdir/samples/DataLoad/Catalog
    • WebSphere Commerce DeveloperWCDE_installdir\samples\DataLoad\Catalog
  2. Change the values of the business context attributes inside the <_config:BusinessContext> element to match your store settings:
    For example:
    <_config:BusinessContext storeIdentifier="Madisons" catalogIdentifier="Aurora"
    languageId="-1" currency="USD">
    </_config:BusinessContext>
  3. DB2OracleEncrypt the password of the database user:
    1. Open the command-line interface and navigate to the appropriate directory:
      • WebSphere Commerce EnterpriseWebSphere Commerce - ExpressWebSphere Commerce ProfessionalWC_installdir/bin
      • WebSphere Commerce DeveloperWCDE_installdir\bin
    2. Enter the following command:
      • SolarisLinuxAIX./wcs_encrypt.sh db_password
      • WebSphere Commerce DeveloperWindowswcs_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.
  4. Change the attribute values inside the <_config:Database> element to match your database environment.
    • Apache Derby<_config:Database type="derby" name="..\..\db\mall" />
    • DB2<_config:Database type="db2" name="database name" user="user" password="encrypted password" server="server" port="50000" schema="schema name" />
    • Oracle<_config:Database type="Oracle" name="database name" user="user" password="encrypted password" port="1521" schema="schema name" driverType="thin" />
    • For IBM i OS operating system<_config:Database type="os400" name="database name" user="user" password="encrypted password" server="server" remoteDB="true" driverType="toolbox" />
    Where:
    type
    • Apache Derbyderby
    • DB2db2
    • Oracleoracle
    • For IBM i OS operating systemos400
    name
    The name of the database
    user
    The database user ID. If you are using an Oracle database, the user you specify should be identical to the schema. If you specify an invalid schema in the settings, the user is used as the database schema if the user is different and valid. The utility displays a warning, which explains that a change occurred and then the utility continues to run. If you use DB2 and you specify an invalid schema, an error message displays. This message indicates that a valid schema is required before the utility runs.
    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, you 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.
    remoteDB
    Indicates whether the database is remote. For instance, if your system uses DB2 for IBM i with a remote iSeries database, set the value for this parameter to be "true".
    driverType
    Optional: The database driver type.

    OracleThe default value for the driverType is thin. Another possible option for the driverType is oci8, which is the oracle thick driver.

    WebSphere Commerce Version 7.0.0.8DB2The supported values for the driverType are 2 and 4.

    For IBM i OS operating systemWebSphere Commerce DeveloperIf you are configuring your development environment to use DB2 for IBM i, set the value for this parameter to be "toolbox".

    schema
    The name of the database schema.
  5. Save and close the configuration file.
  6. If you want to set the inventory system to non-ATP, run the following SQL statement:
    UPDATE STORE SET INVENTORYSYSTEM=-2 WHERE STORE_ID in (SELECT STOREENT.STOREENT_ID FROM STOREENT 
    WHERE STOREENT.IDENTIFIER ='storeIdentifier')
    Where storeIdentifier is the external identifier for your store, for example Madisons.
    Note: By default, the Madisons store uses ATP inventory type. If an ATP store is wanted, omit this step.