Migrate > Migrating WebSphere Commerce Developer > Prepare to migrate
Run pre-migration scripts
Before you run pre-migration scripts, ensure that you have a backup of the development database.
Before migrating the database, run a database setup script and a reset stores script. If you are using Cloudscape, migrate the database first, before using the database setup script.
V5.6: Note: The SQL files mentioned in the steps below are part of the v7 installation. If the new Version 7 development environment is on a different machine than v5.6.1, copy the two SQL files to the v5.6.1 machine before running the SQL files.
Procedure
- V5.6: If you are migrating from Version 5.6.1.
- Copy the WebSphere Commerce v5.6.1 database to a different location for example, C:\WCToolkitEE70\db\.
- Start Cloudscape.
- Navigate to the directory WCDE_installdir\bin in your 5.6.1 environment.
- Type ij.
- Connect to the copy of the WebSphere Commerce 5.6.1 , for example:
connect '../WCToolkitEE70/db/database_name';where database_name is the name of the database.
- To drop the views, enter:
Run 'WCDE_installdir/schema/migration/561/wcs.drop.view.sql';
- Check if all views have been deleted by entering:
- select viewdefinition from SYS.SYSVIEWS;
- To drop the stored procedures, enter:
Run 'WCDE_installdir/schema/migration/561/db2/cloudscape/wcs.drop.stored.procedure.sql';
- Check if all stored procedures have been deleted. Enter:
select alias from SYS.SYSALIASES WHERE ALIASTYPE='M';
- Exit Cloudscape.
- From the WCDE_installdir/bin directory, enter:
toderby.bat database_namewhere:
- database_name
- Location of the current database. For example, WCDE_installdir\db\database_name
The command upgrades the database. If you do not enter parameters, the toderby command shows the syntax with examples .
- Use the setdbtype script to set the database type to the database type that you are migrating from:
- Navigate to the WCDE_installdir\bin directory in a command line window.
- Run the setdbtype command by typing the following command:
Ensure the database exists prior to running setdbtype.
setdbtype db2 DB2_HOME dbName dbAdminID dbAdminPassword dbUserID dbUserPassword [dbHost dbServerPort dbNode]
setdbtype iseries dbName dbHost dbUserID dbUserPassword [createdb]
setdbtype oracle ORACLE_HOME dbName dbAdminID dbAdminPassword dbUserID dbUserPassword [dbHost dbServerPort]
setdbtype cloudscapeWhere:
- DB2_HOME
- The root directory of DB2 on the system (for example, c:\IBM\SQLLIB).
- ORACLE_HOME
- The root directory of the Oracle DBMS on the system (for example, C:\oracle\product\11.1.0\client_1 ).
- iseries
- Type exactly as shown, iseries.
- dbName
- The name of the database (for example, mall).
- dbAdminID
- The database administrator's ID (for example, db2admin, or oracle).
- createdb
- Optional: Creates a database. Type exactly as shown, createdb.
- To reset the stores, enter:
WCDE_installdir/bin/resetstores.batRunning this command ensures that any published stores will run correctly after migration.