Is there a way to find all table names and constraint names referencing given column? I am using MS SQL server database. I have tried several solutions proposed on StackOverflow, e.g.
Find referenced field(s) of foreign key constraint
Get all referencing columns to a referenced column in linq
MSSQL: How to I find all tables that have foreign keys that reference particular table.column AND have values for those foreign keys?
But my database is very large - about 600 tables, so running SQL queries suggested as solutions in above links just take more than 15 min.
Btw. the column in question is probably referenced trough many, many tables and checking this manually seems to take a lot of time. I am trying to put down those constraints (e.g. ALTER TABLE table NOCHECK CONSTRAINT table_constraint_1;) so I could delete data from the table they all are referring to, then insert new data and put up again constraints and see what happens, i.e. fix things for everything to wrok.
Does anybody have any better proposal?
Thanks in advance,
every help is very much appreciated.
mismas