(DB2)

Configure a Db2 Database

Use a script to prepare a Db2 Database for use with WebSphere Commerce.


Before beginning


Procedure

  1. If we are using a remote IBM Db2 server, transfer the WCDE_installdir/bin/create_database_db2.bat/sh script to your remote 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.

  2. (Linux) Add execute permissions to be able to run the script.

      chmod +x create_database_db2.sh

  3. Log on as a system administrator or database administrator.

  4. Open a command line interface. (Windows)

    Note: Open the Db2 command line processor (db2cmd.exe). If the command line processor automatically displays the db2> prompt, enter quit to exit.

  5. Go to the create_database_db2 script.

  6. Run the script to create a database.

    • (Linux)

        ./create_database_db2.sh dbNamedbaUser dbaPassword dbUser 

    • (Windows)

        create_database_db2.bat dbNamedbaUser dbaPassword dbUser 

      dbName
      The name of the database 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.

  7. Back up the database. For more information about how to back up, see BACKUP DATABASE COMMAND.


What to do next

Configure the development environment to use a DB2 database by following the steps in Changing the development database type using setdbtype.