Migration procedure

The following database migration procedures are for FTM 3.2.7.

Db2 on UNIX or the Windows operating system

Note: In this migration procedure, the changes to the EVENT table require the data to be exported or reloaded. To reduce the time that it takes to complete this step, it might be beneficial to review the purge schedule for this table before you do the migration.
Note: The alter column statements put the EVENT table into a REORG PENDING state. Reorganize the tables by using the REORG TABLE command.
  1. Create a backup of the database to be migrated so that it can be rolled back if a problem occurs during or after the migration process.
  2. Start a command window that has Db2® administrative privileges.
  3. Go to the instdir/ftm/v327/admin/scripts/db2/migration/3.2.7.0_from_3.2.6.1 directory. The files in this directory contain all the database changes since FTM 3.2.6 Fix Pack 1.
  4. Run the following scripts:
    Windows operating system scripts to update the database.
    • Migrate-Win-Part1.cmd [Database Name] [Database Schema] [Database User] [Password]
    • Migrate-Win-Part2.cmd [Database Name] [Database Schema] [Database User] [Password]
    UNIX scripts to update the database.
    • Migrate-Unix-Part1.sh [Database Name] [Database Schema] [Database User] [Password]
    • Migrate-Unix-Part2.sh [Database Name] [Database Schema] [Database User] [Password]

Oracle

  1. Create a backup of the database to be migrated so that it can be rolled back if a problem occurs during or after the migration process.
  2. Start a command window that has Oracle administrative privileges.
  3. Go to the instdir/ftm/v327/admin/scripts/oracle/migration/3.2.7.0_from_3.2.6.1 directory. The files in this directory contain all the database changes since FTM 3.2.6 Fix Pack 1.
  4. Run one of the following scripts:
    • Migrate-Win.cmd [Database Name] [Database Schema] - Main Windows operating system script to update the database.
    • Migrate-Unix.sh [Database Name] [Database Schema] - Main UNIX script to update the database.

Db2 on z/OS®

Note: In this migration procedure, the changes to the EVENT table require the data to be unloaded or reloaded. To reduce the time that it takes to complete this step, it might be beneficial to review the purge schedule for this table before you do the migration.
  1. Ensure that all the table spaces that are used or defined are universal table spaces (UTS).
  2. Create a backup of the database to be migrated so that it can be rolled back if a problem occurs during or after the migration process.
  3. Create an FTM installation data set. The suggested name is FTMVvrmf.OINSTLIB, where vrmf represents the FTM version, release, modification, and fix pack level. For example, in TSO, enter:
    Data Set Name . . . : FTMV3270.OINSTLIB
                    Organization  . . . : PO
                    Record format . . . : FB
                    Record length . . . : 80
  4. Copy the contents of the following SMP/E UNIX System Services directories into the FTM installation data set in the following order:
    1. instdir/admin/scripts/database/migration/3.2.7.0_from_3.2.6.1
    2. instdir/admin/scripts/database
    The members that are copied from this /admin/scripts/database/migration subdirectory contain all the database changes since FTM 3.2.6 Fix Pack 1.
  5. Make a copy of the FTM installation data set and work only with that copy. In addition, save the original as a backup. The suggested name for the copy is FTMVvrmf.INSTLIB.
  6. The @@2MACRO member maps each configuration placeholder to the value that it is to have. Determine the appropriate value for each of the configuration placeholders that are shown in Table 1. Then modify the member to assign the values to the configuration placeholders.
  7. Run @@1REXX to replace each placeholder in the FTM installation data set members with the corresponding value that is specified in @@2MACRO. For example, to run @@1REXX for FTMV3270.INSTLIB, issue the following commands in ISPF option 6 (commands):
    ALLOC DA('FTMV3270.INSTLIB') DD(SYSEXEC) SHR REUSE
                    %@@1REXX 'FTMV3270.INSTLIB' @@2MACRO
  8. Check the customized DDL and JCL files before you continue.
  9. Run the Db2 Migration DDL files in your runtime environment in either of the following ways:
    Run the supplied sample JCL
    The sample JCL runs the DDL files that migrate the FTM database:
    1. Adapt the JCL job cards to your system requirements.
    2. You might want to run the SYSIN members one at a time so that you can verify the results before you run the next member. If you do want to run the members one at a time, comment out the lines that are not to be run.
    3. Submit the sample JCL in the following order:
      1. @M270JC1
      2. @M270JC2
      3. @M270JC3
    Run the Db2 Migration DDL files by using SPUFI or a similar tool.
    Use SPUFI or a similar tool to run the DDL members in the same order that is specified in the @M270* JCL members.
  10. Check whether any of the tables or table spaces are in a CHECK-pending or a REORG-pending status. The following example can be used to resolve any COPY-pending issues on a table space.
    //LOBCOPY JOB NOTIFY=&SYSUID
    //JCLLIB JCLLIB ORDER=++DB2LOCATION++.PROCLIB
    //STEP1 EXEC DSNUPROC,UID='FTMCOPY',
    // UTPROC='',
    // SYSTEM=++DB2SUBSYSTEM++
    //SYSCOPY DD DSN=++DB2HLQ++.LOBTMP,UNIT=SYSDA,
    // SPACE=(CYL,(25,10)),DISP=(NEW,DELETE)
    //SYSIN DD *
    COPY TABLESPACE ++FXHDATABASE++.LOB++FXHTBLSPCDIST++16
    /*
Table 1. FTM configuration placeholders used by the migration procedures
Placeholder Description
++DB2HLQ++ Db2 high-level qualifier

For example, SYS2.DB2.V11

++DB2SUBSYSTEM++ Db2 SSID
++DB2RUNLIB++ The Db2 RUNLIB

For example, DSN91008.RUNLIB.LOAD

++DB2DSNTEP2PLAN++ Plan for DSNTEP2 in the Db2 subsystem
++FXHINSTALLATIONLIB++ FTM installation library

For example, FTMV3270.INSTLIB

++FXHSTORAGEGROUP++ FTM storage group
++FXHSCHEMA++ Schema for FTM

For example, FTM

++FXHCURRENTSQLID++ SET CURRENT SQLID user ID
++FXHOPIDTYPE++ Determines whether the operational ID data type is INTEGER or DECIMAL(19,0).
++FXHBUFFERPOOL++ Buffer pool that is used for the new index.
++FXHDATABASE++ The name of the database for FTM. For example, FTMDB.
++FXHTBLSPCDIST++ You can specify a maximum of 3 chars to use to distinguish between the names of different table spaces. For example, if you have multiple instances of FTM.
++UNLOADHLQ++ PDS high-level qualifier. Used by the UNLOAD/LOAD database migration JCL to store the unloaded data.