DB2Oracle

Changing the development database type by using the setdbtype command

After you install WebSphere Commerce Developer, the environment is configured to use the Apache Derby database. If your restored database type is Oracle or DB2, you must run the setdbtype command to point your WebSphere Commerce Developer Version 8.0 environment to your restored database. Ensure that the database that you are switching to exists in your network.

DB2Note: When you specify a DB2 password, make sure that it meets the naming restrictions for WebSphere Commerce databases. If restricted characters are used in database passwords, you might encounter connection errors when you use utilities that take these passwords as input on the command line, including setdbtype.

Some characters might correspond to special characters on certain operating systems and therefore must be escaped. For example, on UNIX, the $ character must be escaped like this character: \$

Before you begin

  • DB2 If you are using a remote database, install the appropriate DB2 client to access the remote DB2 database. For more information, see your DB2 documentation.
  • Oracle
    1. If you are using a remote database, install the appropriate Oracle client to access the remote Oracle database. For more information, see the Oracle documentation.
    2. Create a database. For more information, see Installing and configuring Oracle 12c database.
    3. Create an Oracle database user. For more information, see Oracle database considerations.
      Note: Ensure that the user has enough table space or that Auto Extend is set to Yes in the data file. Grant the user the following privileges: create procedure, create session, create synonym, create table, create trigger, create view, and create materialized view.

Procedure

  1. Stop the WebSphere Commerce Test Server.
  2. Stop the WebSphere Commerce development database.
  3. Go to the WCDE_installdir/bin directory.
  4. Run one of the following commands, depending on the database you are switching to:
    • DB2setdbtype db2 DB2_HOME dbName dbAdminID dbAdminPassword dbUserID dbUserPassword [dbHost dbServerPort dbNode]
    • Oraclesetdbtype oracle ORACLE_HOME dbName dbAdminID dbAdminPassword dbUserID dbUserPassword [dbHost dbServerPort]
    • setdbtype cloudscape
    Where:
    DB2_HOME
    The root directory of DB2. For example, C:\IBM\SQLLIB
    ORACLE_HOME
    The root directory of the Oracle DBMS. For example, C:\oracle\product\11.1.0\client_1
    dbName
    The name of the database. For example, mall.
    dbAdminID
    The database administrator's ID. For example, db2admin or oracle.
    dbAdminPassword
    The associated password for dbAdminID
    dbUserID
    The database user ID that connects to the database.
    dbUserPassword
    The associated password for dbUserID
    dbHost
    The host name of a remote database server.
    dbServerPort
    The port number of the remote database server.
    dbNode
    The node name of the remote database.
  5. Verify that the script ran successfully by checking that the string BUILD SUCCESSFUL is printed at the end of the WCDE_installdir/logs/setdbtype.log log file.