HCL Commerce Developer

Changing the development database type by using the setdbtype command

You must configure your HCL Commerce Developer workspace to point to your IBM Db2 or Oracle database that you installed as a prerequisite.

Before you begin

Verify your database version:

Procedure

  1. Stop the HCL Commerce Developer server.
  2. If you use an Oracle database, copy the Java Database Connectivity (JDBC) driver into the appropriate directory.
    • OracleCopy the ojdbc8.jar driver into the WCDE_installdir/lib/oracle/jdbc/lib/ directory.
  3. Run the setdbtype utility.
    1. Navigate to the WCDE_installdir/bin/ directory.
    2. Run the 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 that is included with HCL Commerce Developer.
      • The root directory for the IBM Db2 database is WCDE_installdir\lib\db2\.
      • The root directory for the Oracle database is WCDE_installdir\lib\oracle\.
      Note: If the path contains whitespace characters, surround the path in quotation marks (").
      dbName
      The name of the database you want to use with HCL Commerce Developer. If this is the first time you are switching databases, enter the name you 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 you are using a local database, you can use localhost.
      dbServerPort
      The port number on the database server that is used for connections. The default port for Db2 is 50000. The default port for Oracle is 1521.
      DB2 To check the port number for the Db2 database:
      1. If you are using a remote database, connect to the remote host. If you 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.

      OracleTo check the port for the Oracle database, go to the oracle_home/network/admin directory. You can find the port number in the listener.ora files.

    For example,
    • DB2For an IBM Db2 database:
      setdbtype.bat db2 W:\WCDE_V9\lib\db2 mall db2AdminID dbAdminPassword dbUserID dbUserPassword localhost 50000
      
    • OracleFor an 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: You 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. HCL Commerce Version 9.0.0.1 only If you updated HCL Commerce Developer from Version 9.0.0.0 to Version 9.0.0.1 before you set up this database, then you must run the updatedb.bat utility to update your database level to 9.0.0.1.Version 9.0.x to Version 9.1 before you set up this database, then you must run the updatedb.bat utility to update your database level to 9.1.

    For more information, see updatedb utility.