+

Search Tips   |   Advanced Search

Portal V7.0 stand-alone: Updating schemas


Database schemaused with the earlier source portal need to be updated for use with the new target portal. The migration process handles these updates for you automatically. However, if the portal uses IBM DB2 Universal Databaseā„¢ for z/OS as the backend repository, we can choose to view the SQL scripts that the migration process uses to update the database schemas.

  1. To ensure that you connect to the appropriate database domains, review wkplc_dbdomains.properties and update the file as needed with the correct database parameters.

  2. DB2 for z/OS only: To generate the scripts used to migrate the database schemas

      cd WP_PROFILE/ConfigEngine
      ./ConfigEngine.sh generate-db-migration-scripts

    WebSphere Portal stores the generated scripts in the WP_PROFILE/PortalServer/DBMigrationScripts/db_Type where db_Type is the DBMthat the portal uses. Each script file name reflects the domain name.

    For example:

      db2_zos/migrate_community_wp.db.impl.sql

      db2_zos/migrate_customization_wp.db.impl.sql

      db2_zos/migrate_jcr_wp.db.impl.sql

      db2_zos/migrate_release_wp.db.impl.sql

    An additional set of files is created to drop tables that were present in 6.0.x and might exist in the 6.1.x installation if you have previously migrated from 6.0.x to 6.1.x. These files have the format dropV6legacyTables_db_domain_wp.db.impl.

    For example:

      db2_zos/dropV6legacyTables_community_wp.db.impl.sql

      db2_zos/dropV6legacyTables_customization_wp.db.impl.sql

      db2_zos/dropV6legacyTables_jcr_wp.db.impl.sql

      db2_zos/dropV6legacyTables_release_wp.db.impl.sql

    We can review these files to understand the schema updates that are performed during migration.

    WebSphere Portal also saves copies of the generated scripts in WP_PROFILE/PortalServer/DBMigrationScripts/db_Type/templates; scripts in the /templates subdirectory are reserved for internal use and should not be run by users.

  3. DB2 for z/OS only: After validating the scripts generated in the previous step. You must run the scripts to make the schema changes. Do not attempt to use the database tools to make the updates. The scripts are provided as a reference to show what changes will be made to the database. Use the provided WebSphere Portal migration tooling to make the required schema changes.

      ./ConfigEngine.sh upgrade-database -DComponentList=wp.db.impl

    Make sure that the runtime user id we are using have sufficient privileges to access the database objects. To grant these privileges we can run the grant-runtime-db-user-privileges task or manually grant them as described in Configuring Portal to use your specific database sections in this documentation.

  4. DB2 for z/OS only: Update the database schemas.

    1. Table spaces that have a CHECK PENDING status can prevent migration from completing successfully. To determine which table spaces have a CHECK PENDING status, run the following query from the command line processor:

      SELECT DBNAME,NAME FROM SYSIBM.SYSTABLESPACE WHERE (STATUS = 'P') OR (STATUS = 'S');

    2. For each table space that the preceding query identifies, type the following command to remove the CHECK PENDING status:

      check data tablespace database_name.tablespace_name

      ...where... tablespace_name and database_name are the respective names of each tablespace and the corresponding database. For more detailed instructions, refer to the Utility Guide and Reference for DB2 for z/OS.

  5. DB2 for z/OS only: After validating the scripts generated in the previous step, you must run the scripts to make the schema changes. Do not attempt to use the database tools to make the updates. The scripts are provided as a reference to show what changes will be made to the database. Use the provided WebSphere Portal migration tooling to make the required schema changes.

      ./ConfigEngine.sh upgrade-database -DExcludeComponentList=wp.db.impl

    Make sure that the runtime user id we are using have sufficient privileges to access the database objects. To grant these privileges we can run the grant-runtime-db-user-privileges task or manually grant them as described in Configuring Portal to use your specific database sections in this documentation.


Parent: Portal V7.0 stand-alone: Migrating databases