For IBM i OS operating systemWebSphere Commerce Version 8.0.1.0 or later

Configuring the development environment to use DB2 for IBM i

The initial installation of WebSphere Commerce Developer provides WebSphere Commerce Developer with the Apache Derby database. You can reconfigure your environment to use DB2 for IBM i.

Procedure

  1. Ensure that the System i user profile uses the local settings for a language as listed in the following table.
    Local settings for System i user profiles
    Language CCSID LangID CountryID
    English 37 ENU US
    French 297 FRA FR
    German 273 DEU DE
    Italian 280 ITA IT
    Spanish 284 ESP ES
    Brazilian Portuguese 37 PTB BR
    Japanese 5035 JPN JP
    Korean 933 KOR KR
    Traditional Chinese 937 CHT TW
    Simplified Chinese 935 CHS CN
    Romanian 870 ROM RO
    Russia 1025 RUS RU
    Polish 870 PLK PL
    Note: Using local settings for a language in your System i user profile other than the languages that are defined in this table are not tested.
  2. Stop the Rational Application Developer server.
    If you forget to shut down Rational Application Developer, the server configuration might be deleted. Refresh the Servers project to restore the server configuration.
  3. Back up your development database.
  4. Start a Windows command prompt and go to the WCDE_installdir/bin directory.
  5. Restore the database to the default Apache Derby database if you are not currently using the default database.
    1. Run the following command to restore your WebSphere Commerce development database and workspace:
      restoreDefault.bat
      You now have the default environment with a Derby database.
  6. Issue one of the following commands, depending on your needs.
    OptionDescription
    You are configuring the development environment to use DB2 for IBM i for the first time and were previously using a different WebSphere Commerce Version 8.0 development database.
    setdbtype iseries dbName dbHost dbUserID dbUserPassword createdb
    where the command parameters are defined as follows:
    dbName
    The name of the database that is registered as *LOCAL in the relational database directory on the IBM i system.
    dbHost
    The fully qualified name of the IBM i machine that is hosting the database.
    dbUserID
    The user profile on the IBM i machine that can access the database.
    dbUserPassword
    The password for the user profile on the IBM i machine that can access the database.
    This command creates and populates the DB2 for IBM i development database and switches the development database to this newly created database.
    You previously used either a Apache Derby or DB2 Database in the development environment and are switching to an existing DB2 Database for IBM i.
    setdbtype iseries dbName dbHost dbUserID dbUserPassword
    where the command parameters are defined as follows:
    dbName
    The name of the database that is registered as *LOCAL in the relational database directory on the IBM i system.
    dbHost
    The fully qualified name of the IBM i machine that is hosting the database.
    dbUserID
    The user profile on the IBM i machine that can access the database.
    dbUserPassword
    The password for the user profile on the IBM i machine that can access the database.
    This command switches the current development database to the existing development database that is specified in the command.
  7. Update the database settings in the WebSphere Commerce configuration file.
    1. Go to the workspace_dir\WC\xml\config directory and open the wc-server.xml file for editing.
    2. Locate the <WebSphere> element within the <InstanceProperties> element.
      Change the value for the JDBCDriverType attribute to be "TOOLBOX".
    3. Save and close the file.
    For more information about updating this file, see Updating the WebSphere Commerce configuration file.
  8. Optional: Depending on the utilities that you need to use, you might need to configure the databases settings for the utilities to use your DB2 for IBM i database.

    For example, to configure the Data Load utility to load data into this database, update the environment configuration file that you use with the utility to use the appropriate settings. For more information, see Configuring the data load environment settings.

  9. To reset the Stores project or before you publish a new starter store, run the command:
    • WCDE_installdir/bin/resetstores.bat
    Note: If you run this command, you cannot use the existing stores if you decide to switch back to the Apache Derby database later.
  10. Restart the WebSphere Commerce Test server.

Results

The WebSphere Commerce development environment is now configured to use a DB2 database. All data in the Apache Derby database remains unchanged until you return to using Apache Derby as the development database. Your Apache Derby database is reset and cleaned when you run any of the following commands:
  • Run the resetdb.bat command
  • Run the resetstores.bat command
  • Run the setdbtype command, specifying Apache Derby and by using the createdb flag.