Develop > WebSphere Commerce development environment > WebSphere Commerce development database > Overview: Changing the development database


Configure the development environment to use a DB2 database

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


Before you begin

You should re-configure the development environment to use an Oracle database if one or both of the following statements applies to the environment:

Ensure you have the following tasks completed:

  1. Install Rational Application Developer with the WebSphere Application Server test environment.

  2. Install the latest fixes for Rational Application Developer

  3. Install the WebSphere Commerce toolkit including a test environment.

  4. Install a DB2 database on a local or remote Windows machine. See the following table for a list of components required for a local or remote installation of the DB2 database.

    Local DB2 Remote DB2

    • The root directory of the DB2 .

      For example, c:\IBM\SQLLIB

    • The database administrator ID

    • The database administrator password

    • The database user ID (schema owner ID)

    • The database user password

    • The root directory of the DB2 client

      For example, c:\IBM\SQLLIB

    • The database administrator ID

    • The database administrator password

    • The database user ID (schema owner ID)

    • The database user password

    • The fully qualified host name of the database server

    • The port number on the database server used for remote connections

    • The node name of the remote database

  5. Backup the existing Apache Derby development database.


Procedure

  1. Stop the Rational Application Developer server.

  2. If you are using a remote WebSphere Commerce development database, complete one of the following actions:

    • If you are creating a new remote WebSphere Commerce development database, the database is automatically catalogued.

    • If you have an existing, remote WebSphere Commerce development database that to use, do the following steps on the WebSphere Commerce developer machine the first time you switch to the existing database:

      1. Catalog the remote database node.

      2. Catalog the remote database.
      For information about how to catalog a remote database node and how to catalog a remote database, see the Catalog Database command help file in the

      Once a remote database node and a remote database are cataloged on machine, they will not have to be cataloged again. You can switch to the cataloged remote database without repeating this step.

  3. Start a Windows command prompt session and switch to directory WCDE_INSTALL/bin.

  4. Complete one of the following selections:

    To configure the development environment to use an newly created DB2

    Issue the following command:

    setdbtype db2 DB2_HOME dbName dbAdminID dbAdminPassword dbUserID dbUserPassword [dbHost dbServerPort dbNode] [createdb]
    

    where:

    DB2_HOME

    The root directory of the DB2 or the DB2 client, depending on if a local or remote database is being configured.

    For example, c:\IBM\SQLLIB.

    dbName

    The name of the database to use with WebSphere Commerce developer. If this is the first time you are switching databases, enter the name to give the database that will be created in the next step.

    dbAdminID

    The database administrator ID.

    dbAdminPassword

    The database administrator password.

    dbUserID

    The database user ID (schema owner).

    dbUserPassword

    The database user password.

    dbHost

    Remote database only The fully qualified host name of the database server.

    dbServerPort

    Remote database only The port number on the database server used for remote connections. The default port is 50000.

    dbNode

    Remote database only The node name of the remote database.
    This command creates and populates the DB2 development database and switches the development database to use this new database.

    To configure the development environment to use an existing DB2

    Issue the following command:

    setdbtype db2 DB2_HOME dbName dbAdminID dbAdminPassword dbUserID dbUserPassword [dbHost dbServerPort dbNode]
    

    where:

    DB2_HOME

    The root directory of the DB2 or the DB2 client, depending on if a local or remote database is being configured.

    For example, c:\IBM\SQLLIB.

    dbName

    The name of the database to use with WebSphere Commerce developer. If this is the first time you are switching databases, enter the name of the existing database.

    dbAdminID

    The database administrator ID.

    dbAdminPassword

    The database administrator password.

    dbUserID

    The database user ID (schema owner).

    dbUserPassword

    The database user password.

    dbHost

    Remote database only The fully qualified host name of the database server.

    dbServerPort

    Remote database only The port number on the database server used for remote connections. The default port is 50000.

    dbNode

    Remote database only The node name of the remote database.
    This command switches the development database to the existing DB2 .

  5. To reset the Stores project or before publishing a new starter store, run the command:

    If you run this command we will not be able to use the existing stores if you decide to switch back to the Cloudscape database at a later time.

  6. Restart the WebSphere Commerce server.


Results

The WebSphere Commerce development environment is now configured to use a DB2 database. All data in the Apache database remains unchanged until you return to using Apache as the development database unless you run the resetdb.bat or resetstores.bat commands. If you run these commands the Cloudscape database is reset and cleaned.


+

Search Tips   |   Advanced Search