You need to use a script to prepare an IBM Db2 database for use with
HCL Commerce.
Procedure
-
Copy the create_database_db2.sh script from the Utility server Docker container to the machine that is running the IBM Db2 server.
-
Use the
docker cp
command to copy from the container to your local
filesystem.
For
example,
docker cp <project_name>_utils_1:/opt/WebSphere/CommerceServer90/bin/create_database_db2.sh /var/tmp/create_database_db2.sh
-
If you are using a remote IBM Db2 server, transfer the
create_database_db2 script from your remote IBM Db2
server into a directory that a database administrator can access.
Add execute permissions to be able to run the script.
chmod +x create_database_db2.sh
-
Log on as a system administrator or database administrator.
-
Open a command line interface.
Note: Open the
IBM Db2 command line processor
(
db2cmd.exe). If the command line processor automatically displays the
db2>
prompt, enter
quit to exit.
-
Go to the create_database_db2 script.
-
Run the script to create a database.
- dbName
- The name of the database that you want to create.
- By default, the HCL Commerce Docker containers load to a database table that is named
mall. If you use a different name for the database, you need to set the
dbName in later steps. In particular, in this topic, Building custom Docker images for use with an Oracle database.
- dbaUser
- The database administrator.
- dbaPassword
- The database administrator password.
- dbUser
- The name of a database user.
- By default, the HCL Commerce Docker containers use the specific username
wcs to connect to the database. If your dbuser account is different, you need
to set the username in later steps. In particular, in this topic, Building custom Docker images for use with an Oracle database.
For
example,
./create_database_db2.sh mall db2inst1 diet4coke wcs
-
Back up the database.
Results
Your IBM Db2 is prepared for use with HCL Commerce.