Comparing Db2 objects
The panel interface in Db2® Object Comparison Tool guides you through the options for comparing Db2 objects. Then, based on those options, the tool generates comparison batch jobs that you can save and reuse.
Before you begin
Before you compare objects, complete the following actions:
- Make sure that the Get DB2 ZPARM field (the GETDB2ZP parameter) on the DB2 Admin Defaults (ADB2P2) panel is set to YES. For detailed instruction on how to change this value, see Changing defaults (IBM Db2 Administration Tool for z/OS
13.1.0).
This option enables Object Comparison Tool to get Db2 subsystem parameter values by calling the stored procedure ADMIN_INFO_SYSPARM. These values are needed so that Object Comparison Tool can write a version file for each object that is being compared. Version files are snapshots of an object at a particular time and include the object definition.
- If you plan to request that Object Comparison Tool also generate apply jobs, make sure that you are connected to the target Db2 subsystem. Apply jobs are jobs that apply changes to the target; these changes are found during the comparison.
This prerequisite ensures that the apply jobs use the correct libraries. If you are connected to a different Db2 subsystem, you must manually update the apply jobs to use the correct Db2 libraries.
- GRANT USAGE ON JAR
- CREATE TABLESPACE with FOR DGTT or FOR SORT
- Auxiliary tables
- Object Comparison Tool treats auxiliary tables as part of the base table definition. Therefore, any auxiliary tables must be included along with their base table in the source or target specification.
- Clone tables
- A clone table cannot be processed without its base table. If you do not specify the base table in the source or target specification, Object Comparison Tool skips the clone table.
- Archive-enabled tables and archive tables
- Object Comparison Tool can handle any combination of specifying these tables in the source, target, or both. For details, see Comparisons with archive-enabled and archive tables.
- Temporal tables and history tables
- Object Comparison Tool can handle any combination of specifying these tables in the source, target, or both. For details, see Comparisons with temporal and history tables.
Procedure
- Specify source objects.
- Specify target objects.
- Optional: Specify compare masks.
- Optional: Specify ignores.
- Generate a compare batch job.
- Run the generated batch job to compare the objects.
What to do next
After you run the comparison, check the generated compare report and then optionally apply the changes to the target objects.