Develop > WebSphere Commerce development environment > WebSphere Commerce development database > Overview: Changing the development database
Configure 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 the 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 the 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:
- Install Rational Application Developer with the WebSphere Application Server test environment.
- Install the latest fixes for Rational Application Developer
- Install the WebSphere Commerce toolkit including a test environment.
- 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
- 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.
- Set the Oracle open_cursors configuration parameter to 1000 or higher. 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 to 1000 or higher, you might receive error messages.
- 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
- Backup the existing development database.
Procedure
- Stop the Rational Application Developer server.
- Start a Windows command prompt session and switch to directory WCDE_INSTALL/bin.
- Complete one of the following selections:
- To configure the development environment to use an newly created Oracle database
Issue the following command:
setdbtype oracle ORACLE_HOME dbName dbAdminID dbAdminPassword dbUserID dbUserPassword [dbHost dbServerPort] createdbwhere:
This command creates and populates the Oracle development database and switches the development database to use this new database.
- 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.
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.
- To configure 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:
This command switches the development database to the existing Oracle database.
- 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.
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.
- Restart the WebSphere Commerce server.
- To reset the Stores project or before publishing a new starter store, run the command:
- WCDE_INSTALL/bin/resetstores.bat
If you run this command we will not be able to use the existing stores if you decide to switch back to the Apache Derby database at a later time.
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. If you run the resetdb.bat or resetstores.bat scommands your Apache Derby database is reset and cleaned.