Run the migration checker and migration utility on the WebSphere Commerce Version 8 development database

By now, you configured your version 9.0 development environment to use your version 8.0 development database. Migrate this version 8.0 database to the WebSphere Commerce Developer Version 9.0 level by running the migration check and migration utility through command line.


Procedure

  1. Run the premigration database check.

    1. Open a command prompt.

    2. Go to the WCDE_installdir\bin directory.

    3. Check the database.

      • wcim_ant.bat -tier db -action check -from 80 [-defaultTablespace yes | no] [-logLevel Error | Warning | Info | Verbose | Debug]

      Where:

        tier
        Specifies the tier of the WebSphere Commerce topology that we are migrating. The only available option is db.

        action
        Specifies the action to perform when the command runs. The supported actions are as follows:

          check
          Runs the database premigration checker to check the status of the database before you migrate it. Run the database premigration checker before you migrate the database.

          migrate
          Migrates the database to WebSphere Commerce Version 9.

        from
        Specifies the version of the WebSphere Commerce database from which we are migrating. The only available option is 80.

        defaultTablespace
        Optional: Specifies whether to use a default table space for the database.

          yes
          Sets a default table space.

          no
          A non-default table space can be used. You are prompted to enter a table space name later in the migration.

        logLevel
        Optional: Specifies the amount of information about the database tier migration that is logged. The valid log levels are as follows:

          Error
          Only error messages are logged.

          Warning
          All warning and error messages are logged.

          Info
          All error, warning, and event messages are logged.

          Verbose
          All errors, events, and other information are logged, including all SQL statement information. It requires 1 - 2 MB of storage for most migrations. Verbose is set by default.

          Debug
          Similar to the Verbose option, but includes some additional debug information. This value is helpful if you encounter errors and need to debug them. It requires 1 - 2 MB of storage for most migrations.

      The following snippet is an example of the database check interactions:

        W:\WCDE_ENT90\bin>wcim_ant.bat -tier db -action check -from 80 -logLevel Verbose
        Database type? 
        db2
        
        Database name?
        mall
        
        Is the database backup completed? [ Yes ] (Yes,No,)
        Yes
        
        Is the database restore completed? [ Yes ] (Yes,No,)
        Yes

      When the check completes successfully, you see the following message:

        INFO:   WCIM has completed the job(s) successfully.

    4. If the database check fails, review the following log file: WCDE_installdir\logs\WCIM\wcim.server.yyyy.mm.dd_hh.mm.ss.log. Address the failure message, and rerun the database check.

  2. Migrate the database.

    1. Open a new command prompt, or use the same prompt that we used to run the database check.

    2. Migrate the database. wcim_ant.bat -tier db -action migrate -from 80 [-defaultTablespace yes | no] [-logLevel Error | Warning | Info | Verbose | Debug] The following snippet is an example of how to run the database migration check:

        W:\WCDE_ENT90\bin>wcim_ant.bat -tier db -action migrate -from 80 -logLevel Verbose
        Database type? 
        db2 
        
        Database name?
        mall
        
        Is the database backup completed? [ Yes ] (Yes,No,)
        Yes
        
        Is the database restore completed? [ Yes ] (Yes,No,)
        Yes

      When the database migration completes successfully, you see the following message:

        INFO:   WCIM has completed the job(s) successfully.

    3. If the database migration fails, review and correct any errors that might be found in the following log file: WCDE_installdir\logs\WCIM\wcim.server.yyyy.mm.dd_hh.mm.ss.log.

      Note: If the database migration fails while it enables content versioning, you need to restore the database before you rerun the migration. To determine whether the migration failed while it enabled content versioning, review the WCDE_installdir\logs\WCIM\wcim.server.yyyy.mm.dd_hh.mm.ss.log file. Check the log to see whether the failure occurs while it runs the createVersion task from the configureContentVersionComponent.xml file.

    4. After the migration completes successfully, review any warnings in the WCDE_installdir\logs\WCIM\wcim.server.yyyy.mm.dd_hh.mm.ss.log, and then determine whether any actions are needed.

After the database is migrated successfully, complete the following post-database migration tasks.

  1. Update the SITE table to contain the required version 9.0 values by running the updateSiteTable command.

    1. Connect to the database server.

    2. Run the following SQL:

        delete from site  where COMPNAME not IN ('BASE', 'management-center');

        update SITE set VERSION = 9, MOD=0, FIXPACK=0 where COMPNAME IN ('BASE', 'management-center');

    3. After the SQL completes, we can run the following SQL to ensure that the SITE table was updated.

        select * from SITE;

  2. Update the SRCHCONF database table with the search preprocessing directory.

    1. Connect to the database server.

    2. Run the following SQL statement.

        update SRCHCONF set CONFIG = replace(CONFIG, 'old_PreProcessdir', 'new_PreProcessdir');

      Where:

        old_PreProcessdir
        The preprocess directory of the version 8.0 search server.

        new_PreProcessdir
        The preprocess directory of the version 9.0 search server.

  3. When you set up the WebSphere Commerce Version 9 environment, you specified an SPIUSER password. Now that the database is migrated from a previous version, your SPIUSER password might be inconsistent. By using the Organization Administration Console, update your SPIUSER password to the same value that you set when creatingd the environment.

    1. Log on to the Organization Administration Console.

    2. Click Access Management > Find Users.

    3. In the Logon ID field, enter spiuser, then click Find.

    4. Select the SPIUSER from the search results, then click Change.

    5. Update the SPIUSER password to the same value that we used when you set up the environment.

    6. Click OK.

  4. Run the updatedb utility.

Previous topic: Preparing to migrate development database.