You can query all constraints in an Oracle database. Usually, the error you get from the database will be somewhere in your logs, or even displayed on the screen, so you have the name of the constraint that is violated. Once you have that, you can just run this simple query:
select constraint_name, table_name
from all_constraints
WHERE constraint_name = 'Faulted_Constraint_Name';
Now you know which table causes the error, and you can start solving the problem.
Of course, the 'all_constraints' table has more fields than just constraint_name and table_name. To find out what more you can query, just use following command:
desc all_constraints
This will give you a list of all queryable fields.
No comments:
Post a Comment