Running the database premigration check

Before you run the database migration, run the premigration check to expose any issues with the database that might cause errors during the migration. Correct any issues to ensure that your database migration completes successfully.

Procedure

  1. Open a command line.
  2. LinuxAIX Switch to the WebSphere Application Server user ID, also known as the wasuser, by running the following command:
    su - wasuser
    Note: This user must have authority to access the files in the WC_installdir directory.
  3. Run the database premigration check. Go to the WC_installdir/bin directory and run the following command:
    • LinuxAIX./wcim_ant.sh -tier db -action check -from 70 -instanceName instance_name -isStaging true | false [-defaultTablespace yes | no] [-logLevel Error | Warning | Info | Verbose | Debug]
    • Windowswcim_ant.bat -tier db -action check -from 70 -instanceName instance_name -isStaging true | false [-defaultTablespace yes | no] [-logLevel Error | Warning | Info | Verbose | Debug]
    • For IBM i OS operating system./wcim_ant.sh -tier db -action check -from 70 -instanceName instance_name -isStaging true | false [-defaultTablespace yes | no] [-logLevel Error | Warning | Info | Verbose | Debug]
    Where:
    tier
    Specifies the tier of your WebSphere Commerce topology that you 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 your database before you migrate it. Run the database premigration checker before you migrate the database.
    migrate
    Migrates the database to WebSphere Commerce Version 8.0.
    from
    Specifies the version of the WebSphere Commerce database from which you are migrating. The only available option is 70.
    instanceName
    Is the name of your WebSphere Commerce Version 7.0 instance.
    isStaging
    Specifies whether you are migrating a staging database. Available options are true or false.
    DB2defaultTablespace
    DB2Optional: Specifies whether to use a default table space for your database.
    yes
    Sets a default table space.
    no
    A non-default table space can be used.
    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.
    Notes:
    1. The migration script prompts you to enter the database user name, password, database name, and whether the database is on the remote machine and the remote machine name. When you input the remote machine name, you need enter the fully qualified host name or the IP address.
    2. The schema name must be same as the user name. If the user name is different than the schema name, you need to transfer the schema to a schema that has same name as user. For information on how to transfer the schema name to another name:
      • DB2Refer to the documentation on the admin_copy_schema command. Depending on the version of DB2 you are using, see one of the following DB2 topics:
      • OracleFor instructions on how to change the schema name, consult the database vendor documentation.

      Alternately, you can create a new database user that has the same name as the current schema, then use this user to migrate the database.

    Example
    ./wcim_ant.sh -tier db -action check -from 70 -instanceName demo
    >Database type? [ db2 ] (cloudscape,db2,os400,oracle,)
    db2
    >Remote database? [ false ] (true,false,)
    false
    >Database name?
    mall
    >Database user?
    wcs
    >Database user password?
    my_db_password
    >Database server port?
    50000
    >Is this a test run? [ Yes ] (Yes,No,)
    Yes
    >Is the database backup completed? [ Yes ] (Yes,No,)
    Yes
    >Is the database restore completed? [ Yes ] (Yes,No,)
    Yes
  4. The database premigration check verifies that you have adequate free disk space to migrate the largest table in your database. If you see a message similar to the following, you might have to increase your disk space.
    • DB2
      
      In order to migrate one of the biggest tables table_name in the database,
      the database migration script needs at least nn MB in the database log space.
      It also needs at least nn MB free disk space in the tablespace.
      Otherwise, the database migration may fail.
      
    • Oracle
      In order to migrate one of the biggest tables table_name in the database,
      the database migration script needs at least nn MB in the database undo segment.
      It also needs at least nn MB free disk space in the tablespace.
      Otherwise, the database migration may fail.
      
  5. If the database check fails, review the following log file: WC_installdir\logs\WCIM\wcim.server.yyyy.mm.dd_hh.mm.ss.log. Address the failure message, and rerun the database check.