Remove referential constraints

You can remove referential constraints in various ways. The full impact of the removal depends on the constraint you are removing and the certain conditions that surround the constraint.

To remove a referential constraint, follow these steps:

  1. Run the Remove Physical File Constraint (RMVPFCST) command.
  2. Specify the constraint or constraints you want to remove using the CST and TYPE parameters.
    • Use the CST parameter to specify all constraints or a specific constraint name.
    • Use the TYPE parameter to specify a particular type of constraint.

You can also remove a referential constraint using iSeries™ Navigator.

When you remove a referential constraint, the system removes the associated foreign keys and access paths from the file. The system does not remove the foreign key access path if any logical file or other constraint on the system uses it.

If you remove a referential, primary key, or unique constraint, and the associated access path is shared by a logical file, the ownership of the shared path transfers to the logical file.

Related concepts
Get started with iSeries Navigator
SQL programming
Related reference
Remove Physical File Constraint (RMVPFCST) command