HCL Workload Automation, Version 9.4

Reconfiguration from Oracle to DB2

About this task

With the following steps all scheduling object definitions and global options can be migrated from the Oracle database of a HCL Workload Automation version 9.4 master domain manager and made to point to a DB2® database.
  1. Run the dataexport command or script to export all scheduling object definitions and global options from Oracle. Find this file in the bin subdirectory of the HCL Workload Automation version 9.4 home directory.
    Run dataexport from a Windows or UNIX command prompt as follows:
    dataexport <source_dir> <export_dir>		 
    where:
    source_dir
    The HCL Workload Automation version 9.4 installation directory.
    export_dir
    The directory where the export files are to be created.
    For example:
    dataexport.cmd F:\TWS93\tws93user F:\TWS93\tws93user\export		 
    The object definitions and the global options are retrieved from the Oracle database and placed in the F:\TWS93\tws93user\export directory.
  2. Verify the following files were created in export_dir:
    • calendars.def
    • erules.def
    • jobs.def
    • globalOpts.def
    • parms.def
    • prompts.def
    • resources.def
    • scheds.def
    • topology.def
    • users.def (includes encrypted user passwords)
    • vartables.def
    • rcgroups.def
    • acls.def
    • sdoms.def
    • srols.def
  3. Stop WebSphere® Application Server as described in Application server - starting and stopping.
  4. Run prepareSQLScripts.bat (.sh) to customize the SQL scripts with the parameters needed to create the HCL Workload Automation database in DB2. Find this file in the TWA_home/TWS/dbtools/db2/scripts directory.
    Run prepareSQLScripts from a Windows or UNIX command prompt as follows:
    • From a UNIX shell run:
      prepareSQLScripts 
         -dbRoot <dbRoot> 
         -dbName <dbName> 
         -dbLocalAdmin <dbLocalAdmin>
         -twsDbUser <twsDbUser> 
         [-tempDir <tempDir>] 
         [-dataTablespace <dataTablespace_name>]
         [-dataTablespacePath <dataTablespacePath>] 
         [-logTablespace <logTablespace_name>]
         [-logTablespacePath <logTablespacePath>] 
         [–tempTablespace <tempTablespace_name>]
         [–userTempTablespace <userTempTablespace_name>]
         [-companyName <companyName>] 
         [-masterDmName <masterDmName>]
         [-eifPort <eifPort>] 
    • From a Windows command prompt run:
      cmd /K prepareSQLScripts 
         -dbRoot <dbRoot> 
         -dbName <dbName> 
         -dbLocalAdmin <dbLocalAdmin>
         -twsDbUser <twsDbUser> 
         [-tempDir <tempDir>] 
         [-dataTablespace <dataTablespace_name>]
         [-dataTablespacePath <dataTablespacePath>] 
         [-logTablespace <logTablespace_name>]
         [-logTablespacePath <logTablespacePath>] 
         [–tempTablespace <tempTablespace_name>]
         [–userTempTablespace <userTempTablespace_name>]
         [-companyName <companyName>] 
         [-masterDmName <masterDmName>]
         [-eifPort <eifPort>] 
    where:
    dbRoot
    The path where the RDBMS software is installed.
    dbName
    The name of the database.
    dbLocalAdmin
    The user ID of the local database administrator.
    twsDbUser
    The database user for HCL Workload Automation.
    tempDir
    The directory where the temporary files created by this process are placed. On Windows the default is <drive>\Documents and Settings\<current_user>\Local Settings\Temp.
    dataTablespace
    The name of the table space for the HCL Workload Automation data. The default is TWSDATA. If you provided a different value at installation time, enter that value again.
    dataTablespacePath
    The path of the table space for the HCL Workload Automation data.
    logTablespace
    The name of the table space for the HCL Workload Automation log. The default is TWSLOG. If you provided a different value at installation time, enter that value again.
    logTablespacePath
    The path of the table space for the HCL Workload Automation log files.
    tempTablespace
    The name of the table space for temporary data. The default is TEMP. If you provided a different value at installation time, enter that value again.
    userTempTablespace
    The name of the table space for temporary user data. The default is USERTEMP. If you provided a different value at installation time, enter that value again.
    companyName
    The name of your company. The default is MYCOMPANY. If you provided a different value at installation time, enter that value again.
    masterDmName
    The name of the master domain. The default is MASTERDM. If you provided a different value at installation time, enter that value again.
    eifPort
    The EIF port. The default is 31123. If you provided a different value at installation time, enter that value again.
    For example:
    cmd /K prepareSQLScripts.bat -dbRoot D:\DB2 
                          -dbName TWS 
                          -dbLocalAdmin db2admin 
                          -twsDbUser tws93User  

    The SQL scripts are customized to create a database named TWS in DB2 for user tws93user. The names of the table spaces are the defaults: TWSDATA, TWSLOG, TEMP and USERTEMP.

  5. Run createdb_root.bat (.sh) to create the database following the specifications of the previous step. Find this file in the tempDir/TWA/tws93/scripts directory, where tempDir is the parameter you specified in step 4.
    Run createdb_root as follows:
    • From a UNIX shell, run:
      createdb_root 
         <dbName> 
         <isClientInstallation> 
         <dbNodeName> 
         <hostName> 
         <srvPortNumber>
         <db2Admin> 
         <db2AdminPwd> 
         <instanceName> 
         <isBackupManager>
    • From a Windows command prompt, run:
      cmd /K createdb_root 
         <dbName> 
         <isClientInstallation> 
         <dbNodeName> 
         <hostName> 
         <srvPortNumber>
         <db2Admin> 
         <db2AdminPwd> 
         <instanceName> 
         <isBackupManager>
    where:
    dbName
    The name of the DB2 database. The maximum length is 5 characters.
    isClientInstallation
    The value is:
    • TRUE if the database is a DB2 client.
    • FALSE if the database is a DB2 server.
    dbNodeName
    The name of the DB2 node.
    hostName
    The host name of the computer where DB2 is to be installed.
    srvPortNumber
    The TCP/IP port number used to communicate with the DB2 server. The default is 50000.
    db2Admin
    The user ID of the DB2 administrator.
    db2AdminPwd
    The password for db2Admin.
    instanceName
    The name of the DB2 server instance.
    isBackupManager
    Specify TRUE if you are migrating a backup master domain manager. Specify FALSE otherwise.
    For example:
    createdb_root TWS FALSE TWS_ND myhost 50000 db2admin passw1rd DB2 FALSE		 
    creates a database named TWS on a DB2 server instance named DB2.
  6. Use the changeDataSource.bat (.sh) command or script to switch the data source in WebSphere Application Server from Oracle to DB2.

    See Changing data source properties for details on how to use the command.

    1. Clear the following properties:
      OracleType2JndiName
      OracleType2DatabaseName
      OracleType2ServerName
      OracleType2PortNumber
    2. Set the following properties:
      DB2Type4JndiName
      DB2Type4DatabaseName
      DB2Type4ServerName
      DB2Type4PortNumber
    3. Set the JDBC driver path for the DB2 in both DB2_JDBC_DRIVER_PATH and DB2UNIVERSAL_JDBC_DRIVER_PATH (the path is the same for both properties).
  7. Reset to a name of your choice the ...JndiName property of the RDBMS from which you are changing.
  8. Set to jdbc/twsdb the ...JndiName property of the new RDBMS
    • See that the following properties are set:
      • For DB2:
        DB2Type4JndiName
        DB2Type4DatabaseName
        DB2Type4ServerName
        DB2Type4PortNumber
  9. Run the changeSecurityProperties.bat (.sh) command or script to change the following security settings:
    j2cUserid
    Write the value you used for twsDbUser in prepareSQLScripts.
    j2cPassword
    Write the password for twsDbUser.
    Note: After you updated these two values, make sure that you also erase all the other lines in the security properties file before you export it again with the changeSecurityProperties command. Failure to do so will result in all the passwords contained in the file being saved as strings of asterisks (*).

    See Changing the security settings for details.

  10. Modify the TWSConfig.properties file located in the <WAS_profile_path>/properties directory, where, WAS_profile_path corresponds to the WebSphere Application Server profile path you specified at installation time. The default path is: TWA_home/WAS/TWSprofile. Comment the following four lines:
    com.ibm.tws.dao.rdbms.rdbmsName = Oracle
    com.ibm.tws.dao.rdbms.modelSchema = <twsDbUser>
    com.ibm.tws.dao.rdbms.eventRuleSchema
    com.ibm.tws.dao.rdbms.logSchema 
    where twsDbUser is the owner of the HCL Workload Automation Oracle schema.
  11. For UNIX only: run the updateSetupCmdLine.sh command or script to set the paths for the new database. Locate this script in the <TWA_home>/TWS/dbtools/db2/scripts directory. The syntax is as follows:
    updateSetupCmdLine.sh -installRoot <TWA_home> -dbRoot <DB_home>
    where:
    –installRoot <TWA_home>
    The installation directory of HCL Workload Automation.
    –dbRoot <DB_home>
    The installation directory of the database.
  12. Start the WebSphere Application Server using the conman startappserver command (see Starting and stopping the application server and appservman)
  13. Manually copy the master domain manager definition from the topology.def file you exported in step 1 (you can find it in export_dir) and use composer new to add it in the DB2 database.
  14. Run dataimport to import all scheduling object definitions and global options to DB2. Find this file in the bin subdirectory of the HCL Workload Automation home directory.
    Run dataimport from a Windows or UNIX command prompt as follows:
    dataimport source_dir export_dir		 
    where:
    source_dir
    The HCL Workload Automation installation directory.
    export_dir
    The directory from where the export files are to be read from. This directory is the same export_dir directory specified for dataexport.
    For example:
    dataimport.cmd F:\TWS93\tws93user F:\TWS93\tws93user\export		 
    The object definitions and the global options are retrieved from the F:\TWS93\tws93user\export directory and stored in the new DB2 database.
  15. Run the following command to set the carry forward option to ALL:
    optman chg cf=ALL
  16. Update the Symphony® file by creating a plan with 0 extension period that begins at the end of the current plan:
    JnextPlan -from start_time -for 0000
    where start_time is the date and time when the current plan ends.
You have now completed the reconfiguration steps.
To migrate a backup master domain manager, perform the following steps :