WebSphere Commerce DeveloperOracle

Configuring the development environment to use an Oracle database

The initial installation of WebSphere Commerce Developer provides WebSphere Commerce Developer with the Apache Derby database. You can re-configure your environment to use an Oracle 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 your environment:
  • You are developing enterprise beans that require you to write database specific SQL.
  • You are making significant changes to the database schema

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 an Oracle 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 Oracle database.
    Local Oracle database Remote Oracle database
    • Oracle Net Services
    • Oracle Net Protocol Support
    • SQL*Plus
    • Oracle JDBC/Thin Interfaces
    • Oracle JDBC/OCI Interfaces
    Database server machine
    • Oracle Net Services
    • Oracle JDBC/Thin Interfaces
    • Oracle JDBC/OCI Interfaces
    WebSphere Commerce development machine
    • Oracle Enterprise Client
    • SQL*Plus
    • Oracle JDBC/Thin Interfaces
    • Oracle JDBC/OCI Interfaces
    • Oracle Network Utilities
    • Oracle Database Utilities
  5. Created a new Oracle user ID and an empty schema. Ensure that the database uses the UTF-8 character set and that the Oracle user ID has access to the new database. The Oracle user ID must not be a reserved user ID like SYSTEM or SYS.
  6. Set the Oracle open_cursors configuration parameter to 1000 or higher. You must restart Oracle after changing the open_cursors value.

    The installation default value of open_cursors is 300. If you do not set the open_cursors value higher, you might receive error messages.

  7. Record the following information about the Oracle database:
    Local Oracle database Remote Oracle database
    • The root directory of the Oracle database.

      For example, C:\ORACLE\ORA

    • The name of the database
    • The database administrator ID
    • The database administrator password
    • The database user ID
    • The database user password
    • The root directory of the Oracle database client

      For example, C:\ORACLE\ORA

    • The name of the remote database
    • The name of the local net service for the remote database
    • The database administrator ID
    • The database administrator password
    • The database user 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
  8. Back up your existing development database.

About this task

Procedure

  1. Stop the Rational Application Developer server.
  2. Start a Windows command prompt session and switch to directory WCDE_installdir/bin.
  3. Depending on your needs, perform one of the following commands.
    OptionDescription
    You are configuring the development environment to use a newly created Oracle database. Issue the following command:
    setdbtype oracle ORACLE_HOME dbName dbAdminID dbAdminPassword dbUserID dbUserPassword [dbHost dbServerPort] createdb
    
    where:
    ORACLE_HOME
    The root directory of Oracle or the database client, depending on if you have a local or a remote database.

    For example, C:\ORACLE\ORA92.

    dbName
    The name of the database to use with WebSphere Commerce developer. If you are using a remote database, this is the name of the database on the remote database server.
    dbAdminID
    The database administrator ID.
    dbAdminPassword
    The database administrator password.
    dbUserID
    The new Oracle user ID created as part of the prerequisites.
    Important: Do not specify a reserved Oracle ID user ID. Examples of reserved Oracle IDs include SYSTEM and SYS.
    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.
    This command creates and populates the Oracle development database and switches the development database to use this new database.
    You are configuring the development environment to use an existing Oracle development database. Issue the following command:
    setdbtype oracle ORACLE_HOME dbName dbAdminID dbAdminPassword dbUserID dbUserPassword [dbHost dbServerPort]
    where:
    ORACLE_HOME
    The root directory of Oracle or the database client, depending on if you have a local or a remote database.

    For example, C:\ORACLE\ORA92.

    dbName
    The name of the database to use with WebSphere Commerce developer.

    If you are using a remote database, this is the name of the database on the remote database server.

    dbAdminID
    The database administrator ID.
    dbAdminPassword
    The database administrator password.
    dbUserID
    The database user ID.
    Important: Do not specify a reserved Oracle ID user ID. Examples of reserved Oracle IDs include SYSTEM and SYS.
    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.
    This command switches the development database to the existing Oracle database.
  4. Restart the WebSphere Commerce server.
  5. To reset the Stores project, or before publishing a new starter store, run the command:
    • WCDE_installdir/bin/resetstores.bat
    Note: If you run this command you will not be able to use the existing stores if you decide to switch back to the Apache Derby database at a later time.
  6. Re-enable any features you are using by running feature enablement.
    See WebSphere Commerce feature packs. There is no need to disable any enabled features.
    WebSphere Commerce DeveloperIntroduced in Feature Pack 2Note: If you enabled search, re-build the search index.

Results

The WebSphere Commerce development environment is now configured to use an Oracle database. All data in the Apache Derby database remains unchanged until you return to using Apache Derby as the development database. Your Apache Derby database is reset and cleaned if you do any of the following:
  • run the resetdb.bat command
  • run the resetstores.bat command
  • run the setdbtype command, specifying Apache Derby and using the createdb flag.