Limited supportBMC provides limited support for this version of the product. As a result, BMC no longer accepts comments in this space. If you encounter problems with the product version or the space, contact BMC Support.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see LOADPLUS for DB2 13.1.

ENFORCE


ENFORCE tells LOADPLUS whether to check for violations of Db2-defined constraints.

ENFORCE.png

For more information about how LOADPLUS handles constraint checking, see Referential-and-check-constraints.

Additional considerations

The following considerations apply to the ENFORCE option:

  • For an SQLAPPLY load:
    • If LOADPLUS invokes DSNUTILB, LOADPLUS passes ENFORCE CONSTRAINTS regardless of the value that you specify.
    • For all other SQLAPPLY load jobs, LOADPLUS ignores this option because Db2 checks all constraints during apply processing.
  • If the ENFORCE option that is in effect causes LOADPLUS to not check for all referential and check constraint violations defined on the table space, LOADPLUS places the affected table spaces in CHKP status if CHECKPEND YES is in effect. For more information about when LOADPLUS sets and resets CHKP status, see Considerations-for-CHKP-status.

Specifying the default

You can specify the default for the ENFORCE command option in your installation options module by using the ENFORCE installation option. LOADPLUS was shipped with a default value of CHECK for this option. The command option overrides the default that is in the installation options module.

CONSTRAINTS

When you specify CONSTRAINTS, LOADPLUS checks the rows to be loaded for violations of both Db2-defined check constraints and referential constraints, if any constraints exist. LOADPLUS discards any rows that violate constraints.

To check referential constraints, you must have XBM or SUF installed and available to LOADPLUS. For information about additional requirements and restrictions when checking referential constraints, see Referential-constraints-and-informational-referential-constraints.

Additional considerations

Note the following additional information about ENFORCE CONSTRAINTS:

  • If LOADPLUS cannot enforce all constraints defined on the table that you are loading and CHECKPEND YES is in effect, LOADPLUS sets CHKP status on that table.
  • If you specify FORMAT BMCUNLOAD, LOADPLUS does not enforce check constraints and issues message BMC50138I. LOADPLUS sets CHKP status if check constraints are defined on the table that you are loading and CHECKPEND YES is in effect.
  • When invoking DSNUTILB, LOADPLUS passes this option to the IBM Db2 LOAD utility for processing unless you also specify INFORI YES.

INFORI

This option tells LOADPLUS whether to enforce informational referential constraints when enforcing all constraints.

NO

INFORI NO tells LOADPLUS to ignore informational referential constraints when enforcing all constraints.

YES

INFORI YES tells LOADPLUS to enforce informational referential constraints in the same way as other referential constraints.

Restriction

This option is not valid when LOADPLUS invokes DSNUTILB:

  • For an SQLAPPLY load, LOADPLUS passes ENFORCE CONSTRAINTS.
  • Otherwise, LOADPLUS issues message BMC50178E and terminates.

Additional considerations

Be aware of the following information when you specify INFORI YES:

  • LOADPLUS discards any violating rows, just as it does for other referential constraints.
  • If LOADPLUS sets CHKP status on a table because it enforced informational referential constraints on the parent table, you might not be able to use the standard methods for resetting CHKP status. Therefore, if you are enforcing only informational constraints, BMC recommends that you also specify CHECKPEND NO.

    For more information about resetting CHKP status, see Restoring integrity.

RI

When you specify RI, LOADPLUS checks the rows to be loaded for violations of Db2-defined referential constraints only, if any constraints exist. LOADPLUS discards any violating rows.

To check referential constraints, you must have XBM or SUF installed and available to LOADPLUS. 

(PTF BQU3662 applied) SmartSwitch will not switch to BMC AMI Load if RI structures are being processed.

Restriction

This option is not valid when LOADPLUS invokes DSNUTILB:

  • For an SQLAPPLY load, LOADPLUS passes ENFORCE CONSTRAINTS.
  • Otherwise, LOADPLUS issues message BMC50178E and terminates.

INFORI

This option tells LOADPLUS whether to enforce informational referential constraints when enforcing other referential constraints.

NO

INFORI NO tells LOADPLUS to ignore informational referential constraints when enforcing referential constraints.

YES

INFORI YES tells LOADPLUS to enforce informational referential constraints in the same way as other referential constraints.

Additional considerations

Be aware of the following information when you specify INFORI YES:

  • LOADPLUS discards any violating rows, just as it does for other referential constraints.
  • If LOADPLUS sets CHKP status on a table because it enforced informational referential constraints on the parent table, you might not be able to use the standard methods for resetting CHKP status. Therefore, if you are enforcing only informational constraints, BMC recommends that you also specify CHECKPEND NO.

    For more information about resetting CHKP status, see Restoring integrity.

CHECK CONSTRAINTS

When you specify CHECK CONSTRAINTS, LOADPLUS checks the rows to be loaded for violations of Db2-defined check constraints only, if any constraints exist. LOADPLUS discards any violating rows.

(PTF BQU3662 applied) SmartSwitch will not switch to BMC AMI Load if RI structures are being processed.

Restrictions

The following restrictions apply to the ENFORCE CHECK CONSTRAINTS option:

  • If you specify FORMAT BMCUNLOAD, LOADPLUS ignores this option and issues message BMC50138I. LOADPLUS sets CHKP status if there are check constraints on the table that you are loading and CHECKPEND YES is in effect.
  • This option is not valid when LOADPLUS invokes DSNUTILB:
    • For an SQLAPPLY load, LOADPLUS passes ENFORCE CONSTRAINTS.
    • Otherwise, LOADPLUS issues message BMC50178E and terminates.

NO

Specify NO when you do not want to verify check constraints or referential constraints during LOADPLUS processing. When you specify NO, LOADPLUS loads all rows regardless of whether they violate check constraints or referential constraints. If CHECKPEND YES is in effect, LOADPLUS automatically sets the object status to CHKP.

When invoking DSNUTILB:

  • For an SQLAPPLY load, LOADPLUS passes ENFORCE CONTRAINTS.
  • Otherwise, LOADPLUS passes this option to the Db2 LOAD utility for processing.

 

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*