Referential Integrity When a Table Is Inconsistent - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905
Referential integrity is supported only on the Block File System on the primary cluster, not on the Object File System.

While a table is marked inconsistent, no updates, inserts, or deletes are permitted. The table is fully usable only when the inconsistencies are resolved. This restriction is true for both hard and soft (Referential Constraint) referential integrity constraints.

You may intend or need to revert to a definition of a table that causes an inconsistent reference on that table.

After the child table is archived, the parent table can be dropped.

When the child table is restored, the parent table no longer exists. The normal ALTER TABLE DROP FOREIGN KEY request does not work, because the parent table references cannot be resolved.

You can use the DROP INCONSISTENT REFERENCES option to remove these inconsistent references from a table.

The syntax is as follows:

ALTER TABLE  database_name.table_name  DROP INCONSISTENT REFERENCES

You must have DROP privilege on the target table of the request to perform this option, which removes all inconsistent internal indexes used to establish references.