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
- Use IBM Db2 Version 11.1.2.2 or later as your database. For more information, see Installing an IBM Db2 database.
- Use Oracle 12c Release 2, or19c as your database. For more information, see Installing and configuring Oracle Database.
Procedure
- Stop the HCL Commerce Developer server.
-
If you use an Oracle database, copy the Java Database Connectivity
(JDBC) driver into the appropriate directory.
- Copy the ojdbc8.jar driver into the WCDE_installdir/lib/oracle/jdbc/lib/ directory.
-
Run the setdbtype utility.
- Navigate to the WCDE_installdir/bin/ directory.
- 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.To check the port number for the Db2 database:
- 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.
- Issue
db2 get dbm cfg
and look for the value of SVCENAME on a line similar to the following sample:
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 inTCP/IP Service name (SVCENAME) = db2c_DB2
- %SystemRoot%\system32\drivers\etc\services, where %SystemRoot% is the folder where Windows is installed
db2c_DB2 50000/tcp
To 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.
- If you are using a remote database, connect to the remote host. If you
are using a local database, continue on your local machine.
For example,- For an IBM Db2
database:
setdbtype.bat db2 W:\WCDE_V9\lib\db2 mall db2AdminID dbAdminPassword dbUserID dbUserPassword localhost 50000
- For 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. -
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 isBUILD 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"
-
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.