Hi, What is the bets way to disable all fk's and triggers within a given schema! Cheers
Spool the output from this script and run it against your schema to disable the constraints Code: SELECT 'ALTER TABLE '|| table_name || ' DISABLE CONSTRAINT ' || constraint_name || ' ;' FROM user_constraints WHERE constraint_type = 'R' To disable the triggers Code: SELECT 'ALTER TRIGGER '||trigger_name||' DISABLE;' FROM user_triggers HTH
SELECT 'ALTER TABLE '|| table_name || ' DISABLE CONSTRAINT ' || constraint_name || ' ;' FROM user_constraints WHERE constraint_type = 'R'
SELECT 'ALTER TRIGGER '||trigger_name||' DISABLE;' FROM user_triggers
Last edited by jovery; 08-21-2003 at 04:59 AM.
Jim Oracle Certified Professional "Build your reputation by helping other people build theirs." "Sarcasm may be the lowest form of wit but its still funny" Click HERE to vist my website!
Thanks
Forum Rules