(Developer)

Change the development database type using setdbtype

Configure the WebSphere Commerce Developer workspace to point to a Db2 or Oracle database.


Before beginning

Verify the database version:


Procedure

  1. Stop the WebSphere Commerce Developer server.

  2. (Oracle) Copy Oracle JDBC driver from the Oracle database server...

      cd WCDE_installdir/bin
      mkdir lib/oracle/jdbc/lib/
      cp ojdbc8.jar lib/oracle/jdbc/lib/

  3. Run the following setdbtype utility.

      setdbtype.bat dbType DRIVER_HOME dbName dbAdminID dbAdminPassword dbUserID dbUserPassword dbHost dbServerPort

    Where

      dbType
      The type of the database. The value can be db2 or oracle.

      DRIVER_HOME
      The root directory of the database driver included with WebSphere Commerce Developer. The root directory for the Db2 database is

      The root directory for the Oracle database is...

      If the path contains whitespace characters, surround the path in quotation marks (").

      dbName
      The name of the database we want to use with WebSphere Commerce development environment. If this is the first time we are switching databases, enter the name we want to give the database that will be created.

      dbAdminID
      The database administrator ID.

      dbAdminPassword
      The database administrator password.

      dbUserID
      The database user ID (schema owner).

      dbUserPassword
      The database user password.

      dbHost
      The fully qualified host name of the database server. If we are using a local database, we can use localhost.

      dbServerPort
      The port number on the database server used for connections. The default port for Db2 is 50000. The default port for Oracle is 1521. Be sure of using the right port number. (DB2) To check the port number for the Db2 database, follow these steps:

      1. If we are using a remote database, connect to the remote host. If we are using a local database, continue on your local machine.

        • Open a Db2 command line by running the db2cmd program.

      2. Issue db2 get dbm cfg and look for the value of SVCENAME on a line similar to the following sample:

          TCP/IP Service name (SVCENAME) = db2c_DB2

        If the value is numeric, then use the numeric value. If the value is not numeric, as in the example that is provided, find the port value in

        • (Windows) %SystemRoot%\system32\drivers\etc\services, where %SystemRoot% is the folder where Windows is installed

        Search for db2c_DB2 and find a line similar to the following sample:

        • db2c_DB2 50000/tcp

        In this case, the value for dbServerPort is 50000.

      (Oracle) To check the port for the Oracle database, go to the oracle_home/network/admin directory. We can find the port number in the listener.ora file.

    For example,

    • For a Db2 database:

        setdbtype.bat db2 W:\WCDE_V9\lib\db2 mall db2AdminID dbAdminPassword dbUserID dbUserPassword localhost 50000

    • For Oracle database:

        setdbtype.bat oracle W:\WCDE_V9\lib\oracle orcl oracleAdminID oracleAdminPassword dbUserID dbUserPassword localhost 1521

    Note: The setdbtype command takes approximately 15 minutes to complete.

  4. 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.

    Note: We can ignore the following warnings and errors if the final result is BUILD SUCCESSFUL.

    • WASX7357I: By request, this scripting client is not connected to any server process. Certain configuration and application operations will be available in local mode.

    • WASX7309W: No "save" was performed before the script "WCDE_V9/setup/configureDataSource.jacl" exited; configuration changes will not be saved.

    • [publishEar] Error publishing the application: "Publishing failed"

  5. (v9.0.0.1) If you installed WebSphere Commerce Developer Version 9.0.0.0 and 9.0.0.1 together before setting up this database, run updatedb.bat to update the database level to 9.0.0.1.

Previous topic: Configure HCL Commerce database
Next topic: Loading the WebSphere Commerce Developer database schema


Related reference
EJB errors after updating to WebSphere Commerce Developer Version 9.0.0.1 or 9.0.0.2