Ignore fields

By using ignore fields, you can compare DB2® catalog records while ignoring some fields. Ignore fields are used in situations where you are aware of differences between source and target objects, but you do not want these changes to be recognized and cause a change.

The purpose of ignoring fields during comparison is to:
  • Avoid comparisons that are meaningless

    Timestamps and statistical information are examples of this type of information. These types of ignore fields are called system ignores and are included by default whether they are explicitly specified on the ISPF panels.

  • Protect specified fields against updates

    You can specify that certain fields are to be ignored by the comparison process. Examples of fields that you might want to ignore are fields that contain space information because production tables and indexes are often larger than the corresponding test tables and indexes. You might also want to ignore fields that contain buffer pool names, because a broader set of pools might be implemented in the production system.

No field in a DB2 catalog record for which ignore is specified is compared. If you must recreate an object because of other changes, values for ignored fields are taken from the target version file. All other fields have values taken from the source version file.

Some catalog fields are automatically ignored by the Compare program, such as statistics, dates, and internal identifiers. As mentioned previously, these fields are called system ignores. You can list system ignores by using the reporting options described in Batch compare report format.

Important: Use caution when specifying ignore fields. If possible, use the generic ignore field specifications: Bufferpool, Space, Storage, and Partitioning. These specifications provide for some common sets of fields that are often intentionally different on source and target systems.

Because many fields in the DB2 catalog records are interdependent, when one field is ignored, the value in another field might be invalid if that field is not ignored also. For example, the TYPE fields for tables and table spaces. If TYPE is ignored for table spaces, a table space could keep the LARGE (TYPE) attribute. If the compare source is a segmented table space, the resulting set of attributes will be invalid if the SEGSIZE field is not ignored also.

Another type of dependency is between the SQTY and SECQTYI fields on SYSTABLEPART and SYSINDEXPART that are updated by DB2. If secondary quantity is to be ignored, specify both fields or use the generic SPACE specification.

The syntax for specifying ignore fields is shown in the following figure:

Figure 1. Ignore field syntax
objecttype: field1, field2,...,fieldn

where:

  • objecttype is the DB2 catalog table name
  • fieldx is the DB2 catalog column to be ignored

Several examples of ignore field specifications are shown in the following figure:

Figure 2. Examples of ignore fields
SYSDATABASE: BPOOL

SYSDATABASE: INDEXBP,STGROUP

SYSTABLESPACE: BPOOL

SYSTABLEPART: PQTY,SQTY,STORNAME,VCATNAME

SYSINDEXES: INDEXSPACE

SYSINDEXPART: PQTY,SQTY,STORNAME,VCATNAME

When you specify fields to ignore, specify the DB2 catalog table name and which fields within it are to be ignored. In Figure 2, the first example is for a database. It shows that for SYSDATABASE, the field BPOOL is ignored when the comparison is performed.

If the compared objects originate from two different versions of DB2, they might be different because more parameters, attributes, or clauses are supported by one of the version (typically the newer version). In this case, Object Comparison Tool ignores such fields just like ignore fields that are manually entered. No differences of this kind are reported.

Important: Some values are stored in the DB2 catalog in both internal and external formats. Internal format is only understood by DB2 (not documented) and external format is suitable for input and output. Object Comparison Tool will always ignore the internal format. To ignore the value, there must be an ignore specification for the field that contains the external format of the value.

For example, SYSINDEXPART.LIMITKEY keeps the high value of the limit key of the partition in internal format. SYSTABLEPART.LIMITKEY keeps the high value of the partition in external format. Therefore, if you need to ignore SYSINDEXPART.LIMITKEY, specify SYSTABLEPART.LIMITKEY.

Storing an ignore in the Change Management database

If you are using Object Comparison Tool and choose option 4 on the Object Comparison Tool Menu to specify the fields to ignore, you can specify that the ignore that is created be stored in the Change Management database instead of a data set. To have the ignore stored in the Change Management database, complete the following steps:

  1. Specify option 4 on the Object Comparison Tool Menu to display the Specify Compare Ignore Fields panel.
  2. As shown in the following figure, specify an owner and a name for the ignore, do not specify a data set name, and specify YES in the Edit Ignores field.
    Figure 3. Specify Compare Ignore Fields panel (GOC4)
    Compare ----------------- Specify Compare Ignore Fields ----------------------
    Option ===>                                                                   
                                                                                  
                                                                                  
                                                                                  
    Ignore Table Entry:                                                           
                                                                                  
      Owner . . MYID     >               (? to look up)                           
      Name  . . MYIGNORE           >     (? to look up)                           
    Data Set:                                                                     
      Data Set Name . .                                                           
    Options:                                                                      
      Edit Ignores  . . YES (Yes/No)                                              
    
  3. For each table that is displayed on the Specify Ignore Fields: Objects panel, use the U line command to display the catalog field columns that can be ignored.
  4. On the Select Ignore Fields panel for the table, use the U and S line commands to select or de-select a particular field to be ignored.
  5. Press F3 to return to the list of Db2 catalog tables (the Specify Ignore Fields: Objects panel). Pressing F3 again returns you to the Object Comparison Tool Menu panel.