DB2-z/OS: Partitioning ODS change log

[] [] [] [] [] [] [] []

Symptom

You have migrated your database system from DB2 for z/OS Version 7 to Version 8. The Operational Data Store (ODS) change log tables remain unpartitioned.
Other terms

DB2, OS/390, z/OS, Z_CONVERT_CHANGELOG_DB2
Reason and Prerequisites

In DB2 Version 8, ODS change log tables are always partitioned when they are created. This ensures that larger data volumes can be kept in the ODS change log. Furthermore, this means that you can delete data efficiently by partitions.
Up to now, non-partitioned ODS change log tables remain unpartitioned after you migrate to DB2 Version 8. These are the ODS change log tables that were activated according to Note 485878 without setting the RSADMIN parameter. Unlike Persistent Staging Area (PSA) tables, there is no versioning for ODS change log tables; that is, they cannot be partitioned automatically using a new version. To be able to use the partitioning with DB2 Version 8, unpartitioned ODS change log tables must be converted.
Solution

Implement ABAP report Z_CONVERT_CHANGELOG_DB2 that is attached to this note as a text file. This report checks, and if necessary converts, all ODS change log tables that are not partitioned. During this process, the original ODS change log table is renamed and thus becomes a shadow table. The ODS is reactivated and as a result, a new partitioned change log table is created. The data from the shadow table is written to this table and distributed across several partitions if required. The control tables are updated as required.
Start the report with the “Check table status” option to get an overview of the conversions that are necessary.
With the “Run REORG after insertion of first data package” option, a REORG is run after the first data package is inserted or after the first 50,000 records. You must maintain the CCMS profile (transaction DB2J) for this.
The “Switch tablespace to NOT LOGGED before data insertion” option sets the NOT LOGGED attribute before write back. After the data is written, the tablespace is reset to LOGGED. To ensure that the DB2 database is not in the COPY PENDING mode afterwards, it is started using ACCESS(FORCE).
To execute the actual conversion, you should run the report in the background.
ABAP report Z_CONVERT_CHANGELOG_DB2 converts only unpartitioned ODS change log tables. See Note 986202 for information about ODS change log and PSA tables that are partitioned according to the Version 7 schema, as described in Note 485878.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Leave a Comment