Preparing an IBM Db2 database for use with HCL Commerce
You need to use a script to prepare an IBM Db2 database for use with HCL Commerce.
Before you begin
- Ensure that you have an IBM Db2 Database server ready for use. For information, see Using an IBM Db2 database.
- Create a database user (
dbuser
). For example, wcs. By default, the HCL Commerce Docker containers use the specific username wcs to connect to the database. If yourdbuser
account is different, you need to set the username in later steps. In particular, this topic, Building custom Docker images for use with an Oracle database. - Initialize variable to support running Db2 commands in the Windows command line.
- Ensure that you have access to a running Utility server Docker container.
Procedure
-
Copy the create_database_db2.sh script from the Utility server Docker container to the machine that is running the IBM Db2 server.
-
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.
-
./create_database_db2.sh <dbName> <dbaUser> <dbaPassword> <dbUser>
- dbName
- The name of the database that you want to create.
- dbaUser
- The database administrator.
- dbaPassword
- The database administrator password.
- dbUser
- The name of a database user.
For example,./create_database_db2.sh mall db2inst1 diet4coke wcs
-
-
Back up the database.
For more information about how to back up, see BACKUP DATABASE COMMAND.