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

  1. Apache DerbyV5.6: If you are migrating from Version 5.6.1.

    1. Copy the WebSphere Commerce v5.6.1 database to a different location for example, C:\WCToolkitEE70\db\.

    2. Start Cloudscape.

    3. Navigate to the directory WCDE_installdir\bin in your 5.6.1 environment.

    4. Type ij.

    5. 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.

    6. To drop the views, enter:

      Run 'WCDE_installdir/schema/migration/561/wcs.drop.view.sql';
      

    7. Check if all views have been deleted by entering:

      • select viewdefinition from SYS.SYSVIEWS;

    8. To drop the stored procedures, enter:

      Run 'WCDE_installdir/schema/migration/561/db2/cloudscape/wcs.drop.stored.procedure.sql';
      

    9. Check if all stored procedures have been deleted. Enter:

      select alias from SYS.SYSALIASES WHERE ALIASTYPE='M';
      

    10. Exit Cloudscape.

    11. From the WCDE_installdir/bin directory, enter:

      toderby.bat database_name
      

      where:

      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 .

  2. Use the setdbtype script to set the database type to the database type that you are migrating from:

    1. Navigate to the WCDE_installdir\bin directory in a command line window.

    2. Run the setdbtype command by typing the following command:

      Ensure the database exists prior to running setdbtype. DB2

      setdbtype db2 DB2_HOME dbName dbAdminID dbAdminPassword dbUserID dbUserPassword [dbHost dbServerPort dbNode]
      

      For IBM i OS operating system

      setdbtype iseries dbName dbHost dbUserID dbUserPassword [createdb] 
      

      Oracle

      setdbtype oracle ORACLE_HOME dbName dbAdminID dbAdminPassword dbUserID dbUserPassword [dbHost dbServerPort] 
      

      Apache Derby

      setdbtype cloudscape
      

      Where:

      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 ).

      For IBM i OS operating system 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).

      For IBM i OS operating system createdb

      Optional: Creates a database. Type exactly as shown, createdb.

  3. To reset the stores, enter:

    WCDE_installdir/bin/resetstores.bat
    

    Running this command ensures that any published stores will run correctly after migration.


+

Search Tips   |   Advanced Search