Migrate Payments database

 

 

Considerations before migrating Payments database

If you have any third-party cassette installed on your previous release, manually copy the following directory from your previous release to the corresponding directory of WebSphere Commerce v6:
WC_installdir/payments/cassettes/third-party_cassette_name

(i5/OS) Before running the Payments database migration script (migratepaymentsdb) on your previous Payments database, IBM recommends that you back it up.

Save the original payments instance library. For example:

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

Depending on where the migrated Payments database will be, do one of the following:

If your previous Payments database and your migrated Payments database will exist on the same machine, do the following:

  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 WebSphere Commerce machine.

  2. Sign on to the WebSphere Commerce v6 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 :

    • HOSTNAME is the hostname of the machine where the database resides.

    • DATABASE_NAME is the relational database name, as displayed with command WRKRDBDIRE, of the machine where the database resides.

    • NEW_INSTANCE_NAME is the name of the new Payments instance

    • NEW_INSTANCE_PWD is the password of the new Payments instance

    • OLD_INSTANCE_NAME is the name of the previous version Payments instance

    • EMPTYLIB is 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:

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 v6 level.

Proceed to Migrate Payments database using the migratepaymentsdb script

If your previous Payments database and your migrated Payments database will exist on different machines, do the following:

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

  2. On the target machine...

    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)

Proceed to Migrate Payments database using the migratepaymentsdb script

 

Migrate Payments database using migratepaymentsdb script

When you run the Payments database tier migration script (migratepaymentsdb) it performs the following steps:

The database tier migration tool will attempt to migrate any third-party cassettes.

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.

The required tables are copied into the migrated database, but the cassette might not be fully functional due to other reasons. The database tier migration will continue; it will not stop in the middle of a migration because of a problem it encounters on any individual cassette.

  1. Run the migration script for DB2 databases as follows:

    • (i5/OS) Sign on with the temporary Payments user profile and open a QShell window by running the STRQSH command. (You always run this command on the system where WebSphere Commerce Payments, v6 is installed.)

    • (Linux) Open a shell prompt window, and Switch to the WAS user ID, WAS_user, (for example, wasuser): su - wasuser

    • (Windows) Open a DB2 command window.

  2. Switch to the following directory:

  3. (i5/OS) Migrate the previous Payments database by running the following command:

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

    where :

    • relationalDatabaseName is the name of the database
      where the payments schema resides (use the WRKRDBDIRE command).

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

    • schemaName is the name of the new Payments instance.

    • version is either 5.5.0.0, 5.6.0.0 or 5.6.1.0.

    • databasePassword is 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.

    When the migration completes, review the log file that is indicated in the "Event: Migration has finished successfully. Please check the log file... " message that appears in the command window where you ran the payments migration script.

    (Linux)(Windows) Migrate the previous Payments database by running the following command:

    • (Linux)

      ./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 is the Payments database that you are migrating.

      • db_userID is the user ID to connect to the Payments database that you are migrating.

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

      • schema_owner is the database schema owner user ID for DB2 databases. Enter the schema_owner in uppercase characters.

    (Linux)(Windows) After the Payments database tier migration is complete, in order to start the Payments server successfully, you should increase the database log file size by updating your database configuration as follows:

    db2 update db cfg for your_payments_db using logfilsiz 10000
    
    

    After you have made the update, restart DB2.

  1. Run the migration script for Oracle databases as follows:

    (AIX)(Solaris) Switch to the WAS user ID, WAS_user (for example, wasuser) :
    su - wasuser

  2. Switch to the bin subdirectory under WC60_installdir.

  3. Run the database tier migration script as follows:

    • (AIX)(Solaris)

      ./migratepaymentsdb.sh -dbtype oracle -dbname db_name -dbuser db_userID 
      [-dbpass db_password] [-hostname host_name] [-portport_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 is the Payments database that you are migrating. For Oracle databases, this is the Oracle SID (System ID).

      • db_userID is the user ID to connect to the Payments database that you are migrating.

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

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

      • port_number is the Oracle listener port number. By default, the port is 1521.

Related tasks