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
Defining the environment settings
- Open the Data Load environment wc-dataload-env.xml configuration
file in the appropriate directory:
- WC_installdir/samples/DataLoad/Catalog
- WCDE_installdir\samples\DataLoad\Catalog
- 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>
- Encrypt the password of the database
user:
- Open the command-line interface and
navigate to the appropriate directory:
- WC_installdir/bin
- WCDE_installdir\bin
- Enter the following command:
- ./wcs_encrypt.sh db_password
- wcs_encrypt.bat db_password
- 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. - Open the command-line interface and
navigate to the appropriate directory:
- Change the attribute values inside the
<_config:Database>
element to match your database environment.<_config:Database type="derby" name="..\..\db\mall" />
<_config:Database type="db2" name="database name" user="user" password="encrypted password" server="server" port="50000" schema="schema name" />
<_config:Database type="Oracle" name="database name" user="user" password="encrypted password" port="1521" schema="schema name" driverType="thin" />
<_config:Database type="os400" name="database name" user="user" password="encrypted password" server="server" remoteDB="true" driverType="toolbox" />
- type
- derby
- db2
- oracle
- os400
- 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.
The default value for the
driverType
isthin
. Another possible option for thedriverType
isoci8
, which is the oracle thick driver.The supported values for the
driverType
are2
and4
.If 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.
- Save and close the configuration file.
- If you want to set the inventory system to non-ATP, run the following SQL
statement:
Where storeIdentifier is the external identifier for your store, for example Madisons.UPDATE STORE SET INVENTORYSYSTEM=-2 WHERE STORE_ID in (SELECT STOREENT.STOREENT_ID FROM STOREENT WHERE STOREENT.IDENTIFIER ='storeIdentifier')
Note: By default, the Madisons store uses ATP inventory type. If an ATP store is wanted, omit this step.