Transferring WebSphere Portal and Java Content Repository Databases to

View information on manually transferring data to the DB2 for i database you have installed and set up. Follow these steps to transfer WebSphere Portal and Java Content Repository databases to DB2 for i. As an alternative to the manual database transfer procedure that this topic describes, you can use the configuration wizard to complete the database transfer task. However, you cannot specify all settings through the configuration wizard. For this reason, you must specify the required settings in the appropriate property files before transferring the database with the configuration wizard.

Tips:
  • To run these tasks as a non-root user, you must first run the task shown -R non-root_user WebSphereDir.

  • If you are transferring from Oracle or Oracle RAC, the open_cursors setting should be set to 1500 by default. However, you might need to increase this value based on the table count in the Java Content Repository schema.

  • Be sure that DB2 for i is started by checking the service. If attempts to restart result in a logon failure message, then go to the DB2 for i properties and reenter the password.

  1. If you are running a type 2 connection, edit the db2cli.ini file that resides on the local system, where WebSphere Portal is installed, before you transfer data.

    Important: The database transfer becomes unresponsive at task action-process-constraints if you do not complete these steps.
    1. Locate the file C:\Program Files\IBM\SQLLIB\db2cli.ini.

    2. Add the following lines to the end of the file:

      Editing db2cli.ini:

      If a section named [COMMON] already exists in the file, extend that section by adding the following lines. Otherwise, add a [COMMON] section to the file. Leave an empty line after ReturnAliases=0.

      [COMMON]

      DYNAMIC=1

      ReturnAliases=0

  2. Open a command prompt and change to the directory wp_profile_root\ConfigEngine.

  3. Enter the ./ConfigEngine.sh validate-database -DWasPassword=password command to validate configuration properties.

    Tip: Add the -DTransferDomainList parameter to the above validating task to specify the domains you want to validate; for example: -DTransferDomainList=jcr. If you want to validate all domains, you do not need to specify this parameter on the command line.
  4. From the same command prompt as the previous steps, change to the directory wp_profile_root\bin.

  5. Stop both the server1 and WebSphere_Portal servers:

    • ./stopServer.bat server1 -username admin_userid -password admin_password

    • ./stopServer.bat WebSphere_Portal -username admin_userid -password admin_password

  6. Transfer the database:

    1. Change to the directory wp_profile_root\ConfigEngine.

    2. Enter the following command:

      ./ConfigEngine.sh database-transfer -DWasPassword=password

      Note:
      • To select specific database domains to transfer, modify the -DTransferDomainList specified in the command to include only the domains that you want to transfer. For example, to transfer only the JCR domain you can enter the following command:

        ./ConfigEngine.sh database-transfer -DTransferDomainList=jcr -DWasPassword=password

      • If you have been storing data in ApacheĀ® Derby for a long time, database transfer could fail with OutOfMemory exceptions. If database transfer fails, add the following property to the command in this step:

        ./ConfigEngine.sh database-transfer -DDbtJavaMaxMemory=1536M -DWasPassword=password

    3. After running the task, a message is added to the following log file for you to verify the task ran successfully:

      wp_profile_root\ConfigEngine\log\ConfigTrace.log

      If the configuration fails, verify the values in the wkplc.properties, wkplc_dbdomain.properties, and wkplc_dbtype.properties files and then repeat this step.

  7. Optional: If you specified a runtime database user for the dbdomain.DbRuntimeUser parameter, that user must have sufficient database user privileges. To grant the database user privileges, choose either the manual steps or the command line steps:

    Complete these steps to manually grant database user privileges:

    1. Copy the appropriate template files to a work directory. Choose one of the following template files:

      • createRuntimeRoleForDifferentSchema.sql if the name of the database user and the schema name are not the same.

      • createRuntimeRoleForSameSchema.sql if the name of the database user and the schema name are the same.

      JCR database domain: For the JCR database domain, you must also copy grantExtendedPermissionsToRuntimeRole.sql.

    2. Locate these files in the following directories:

      PortalServer_root\base\wp.db.impl\config\templates\setupdb\dbms\domain

      PortalServer_root\pzn\prereq.pzn\config\templates\setupdb\dbms\domain

    3. Replace all placeholder values with the values as defined in wkplc_dbdomain.properties. Placeholder values are surrounded by the character @.

    4. Run these statements.

    Complete these steps to grant database user privileges with the ConfigEngine task:

    1. Ensure the database administrator user ID is specified for domain.DBA.DbUser inwp_profile_root\ConfigEngine\properties\wkplc_dbdomain.properties. For example, domain.DBA.DbUser=dbadmin.

    2. Run the following task:

      ./ConfigEngine.sh grant-runtime-db-user-privileges -DTransferDomainList=comma_separated_list_of_domains

  8. After transferring the database tables, perform a reorg check to improve performance. Perform this step for each database alias in the property file.

    1. Connect to a database with the following command:

      db2 connect to database_alias user db2admin_userid using password

      Note: Additional options might be required if additional security has been installed. Refer to DB2 Universal Database commands by example for links to the command reference.
    2. After it is connected, run the following command from the DB2 prompt:

      db2 reorgchk update statistics on table all > xyz.out

    3. Look in the reorg column for entries marked with a star or asterisk * in the file xyz.out.

      For each line with *, note the tablename and run the following command for each tablename:

      db2 reorg table tablename

    4. After you have run the reorg command for each tablename, run the following commands:

      db2 terminate db2rbind database_name -l db2rbind.out -u db2_admin -p password

    5. The output file db2rbind.out is only created when there is an error for the db2rbind command.

  9. Run the ./ConfigEngine.sh create-jcr-jms-resources-post-dbxfer -DWasPassword=password command to create JMS resources in the new database.

    Note: Regardless of the method used to transfer data (configuration wizard or the steps in this topic), you must run this task to create JMS resources.
  10. Change to the directory wp_profile_root\bin.

  11. Start the Administrative Server (server1) and WebSphere Portal server.