
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 a IBM Db2 server ready for use. For information, see Installing an IBM Db2 database.
- Create a database user (
dbuser
). For example, wcs. Initialize variable to support running Db2 commands in the Windows command line.
Procedure
-
If you are using a remote IBM Db2 server, transfer the
WCDE_installdir/bin/create_database_db2.bat/sh script to
your remote IBM Db2 server into a directory that a database administrator can
access.
Note: The create_database_db2.sh script is for IBM Db2 on Linux and the create_database_db2.bat script is for IBM Db2 on Windows.
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>
create_database_db2.bat <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 db2admin passw0rd wcs
Note: If you need to troubleshoot any issues, the log file createdb.db2.log is created in the same directory as the script file. -
Back up the database.
For more information about how to back up, see BACKUP DATABASE COMMAND.