In Oracle I have a lot of tables in a given schema. Some of the table constraints in the schema have been disabled.
I have to know for all tables in a given schema with any of the constraints deactivated, what are the (data) rows that would not fulfil the deactivated constraints.
Is there a way to easily collect all the rows that would produce an error if I were to decide to enable the constraints again?
So far, I would try to go constraint by constraint, create a query for each table and run the query. But I wonder whether there is anything that may do the work quickly and less error prone. If possible, the solution should use the information available in view
USER_CONSTRAINTS or any similar one.
I have checked the
constraint documentation in Oracle, in which the
constraint clause may use
ENABLE NOVALIDATE, which allows for having non-compliant rows of data for the existing values until they are modified.
However, I am looking for a solution that would allow me to fix the data before I re-enable the constraints.