Migrate > Take the first steps after WebSphere Commerce migration > Migrating from a previous payment implementation > Migrating WebSphere Commerce Payments Multipayment Framework to v7 (compatibility mode)



Migrating Payments database

The Payments database tier migration script (migratepaymentsdb) collects database information to determine the version, release level, and database type. The script then runs the appropriate pre-migration steps. It updates the Payments Schema to the WebSphere Commerce Payments, v7.0 level. Based on the version and release, the script runs the Payments data migration command for the Payments Framework and IBM cassettes, and any installed third-party cassettes. The required tables for third-party cassette are copied to the migrated database, however, the cassette might not be fully functional until it is redeployed or reinstalled.


Procedure

  1. If you have any third-party cassette installed on your previous release, copy the following directory from the previous release to the corresponding directory of WebSphere Commerce Version 7.0:

    • WC_INSTALL/payments/cassettes/third-party_cassette_name

    BankServACH, CustomOffline, OfflineCard, Paymentech, and VisaNet are not the third-party cassettes. They are the default cassettes.

  2. For IBM i OS operating system Back up the Payments database.

    Save the original payments instance library. For example:

     SAVLIB LIB(previousPaymentsLibrary) DEV(*SAVF) 
    SAVF(saveFile)
    

  3. For IBM i OS operating system If the previous and migrated Payments database are on the same machine, complete this step; otherwise proceed to step 4.

    1. Create a temporary user profile. Ensure the user profile is granted *SECOFR authority. For example:

      CRTUSRPRF USRPRF(paytemp) PASSWORD (password) USRCLS(*SECOFR) CCSID(non_65535_value) TEXT('migration profile')
      

      If your database is remote from the WebSphere Commerce system, create the same temporary profile on both the remote database machine and the local

      • If the WebSphere Commerce, Version 5.6.1 or 6.0 database library is on a remote machine from where WebSphere Commerce, v7.0 is installed, add a relational database directory entry for the remote system on the system where WRKRDBDIRE command to work with relational database directory entries.

    2. Sign on to the WebSphere Commerce Version 7.0 machine with the new temporary profile and start a QSH session (STRQSH).

    3. Enter the following command:

      WC60_installdir/bin/copyDB.sh HOSTNAME DATABASE_NAME NEW_INSTANCE_NAME NEW_INSTANCE_PWD OLD_INSTANCE_NAME EMPTYLIB 
      

      Where:

      host_name

      The hostname of the machine where the database resides.

      DATABASE_NAME

      The relational database name. Displayed using the command WRKRDBDIRE on the machine where the database resides.

      NEW_INSTANCE_NAME

      The name of the new Payments instance

      NEW_INSTANCE_PWD

      The password of the new Payments instance

      OLD_INSTANCE_NAME

      The name of the previous version Payments instance

      EMPTYLIB

      A native library used by migration for temporary storage (this library will be created or cleared as required).

      Run the copyDB command does the following on the database machine:

      • Creates a save file (SAVF), with the name of OLD_INSTANCE_NAME, in a library designated by EMPTYLIB

      • Uses this SAVF to create a database schema with the name NEW_INSTANCE_NAME

      Issue the following command to ensure that the SAVF is not empty:

      DSPSAVF FILE(EMPTYLIB/OLD_INSTANCE_NAME)
      

      If the database is remote, the DSPSAVF command is run on the remote database machine.

      The newly created database schema (NEW_INSTANCE_NAME) will be the database that will be migrated to the WebSphere Commerce Version 7.0 level.

  4. For IBM i OS operating system If the previous and migrated Payments databases exist on separate machines, complete this step.

    1. Move the saved file, that was created of the previous Payments library, to the target machine.

    2. On the target machine, do the following steps:

      1. Create a temporary user profile. Ensure the user profile is granted *SECOFR authority. For example:

        CRTUSRPRF USRPRF(paytemp) PASSWORD (password) USRCLS(*SECOFR) CCSID(non_65535_value) TEXT('migration profile')
        

      2. Sign on to the target machine with this new temporary profile.

      3. Restore the save file of the previous Payments library. For example: RSTLIB SAVLIB(previousPaymentsLibrary) DEV(*SAVF) SAVF(saveFile)

  5. Migrate Payments database using migratepaymentsdb script. Complete the steps appropriate for the platform and database.

    • For IBM i OS operating system

      1. Sign on with the temporary Payments user profile.

      2. Start a Qshell session.

      3. Navigate to the following directory: WC60_installdir/bin

      4. Migrate the previous Payments database by running the following command:

        ./migratepaymentsdb.sh relationalDatabaseName databaseUserId schemaName version [databasePassword]
        

        Where:

        relationalDatabaseName

        The name of the database where the payments schema resides (use the WRKRDBDIRE command).

        databaseUserId

        The user ID to connect to the Payments database that you are migrating (use the paytemp profile you created earlier).

        schemaName

        The database schema name of the new Payments instance.

        version

        The version number: 5.6.1.0 or 6.0.0.0.

        databasePassword

        The password for the user ID to connect to the Payments database that you are migrating. This parameter is optional. If you do not specify the password in the command, the script prompts you to enter the password when you run it.

    • DB2

      1. AIXLinuxSolaris Open a shell prompt window, and switch to the WebSphere Application Server user ID, WAS_user, (for example, wasuser): su - wasuser

      2. Windows Open a DB2 command window.

      3. Navigate to the following directory: WC60_installdir/bin

      4. Migrate the previous Payments database by running the following command:

        • AIXLinuxSolaris ./migratepaymentsdb.sh -dbtype db2 -dbname db_name -dbuser db_userID [-dbpass db_password] -schema schema_name

        • Windows migratepaymentsdb.bat -dbtype db2 -dbname db_name -dbuser db_userID [-dbpass db_password] -schema schema_name

        Where:

        db2

        Specifies that you are migrating a DB2 database.

        db_name

        The Payments database that you are migrating.

        db_userID

        The user ID to connect to the Payments database that you are migrating.

        db_password

        The password for the user ID to connect to the Payments database that you are migrating. This parameter is optional.

        schema_name

        The name of the new Payments instance.

    • Oracle

      1. Switch to the WebSphere Application Server user ID, WAS_user (for example, wasuser) : su - wasuser

      2. Navigate to the following directory: WC60_installdir/bin.

      3. Run the database tier migration script:

        • AIXLinuxSolaris ./migratepaymentsdb.sh -dbtype oracle -dbname db_name -dbuser db_userID [-dbpass db_password] [-hostname host_name] [-port port_number]

        • Windows migratepaymentsdb.bat -dbtype oracle -dbname db_name -dbuser db_userID [-dbpass db_password] [-hostname host_name -port -port_number]

        Where:

        oracle

        Specifies that you are migrating an Oracle database.

        db_name

        The Payments database that you are migrating. For Oracle databases, this is the Oracle SID (System ID).

        db_userID

        The user ID to connect to the Payments database that you are migrating.

        db_password

        The password for the user ID to connect to the Payments database that you are migrating. This parameter is optional.

        host_name

        The fully-qualified host name of the machine, for example, myhost.montreal.ca. The default value is localhost.

        port_number

        The Oracle listener port number. By default, the port is 1521.

  6. When the migration completes, review the log file that is indicated in the "Event: Migration has finished successfully. Check the log file... " message that appears in the command window where you ran the payments migration script. If the migration of these cassettes is not successful, the migration script will indicate the problem. For example:

    Event: Executing command: PaymentsCassetteMigration
    Event: running java program:
    com.ibm.commerce.payments.migration.PaymentsCassetteMigration
    InitiatingPayments cassettes migration.
    Initiating migration for OfflineCard Cassette.
    Migration for OfflineCard Cassette finished.
    Initiating migration for CustomOffline Cassette.
    Migration for CustomOffline Cassette finished.
    Initiating migration for Paymentech Cassette.
    Migration for Paymentech Cassette finished. 
    Initiating migration for My3rdparty Cassette.
    Warning: Could not find My3rdparty cassette in the system, migrate the
    cassette manually.Payments cassettes migration finish.
    

  7. AIXLinuxSolarisWindowsDB2 Increase the database log file size by updating the database configuration:

    db2 update db cfg for your_payments_db using logfilsiz 10000
    

    Restart DB2.


Next topic:

Migrate the Payments application


+

Search Tips   |   Advanced Search