-- flipCnst.sql -- ============ -- written by Doug Kiz -- -- A batch script to enable/disable refereential constraints. -- ================ @@spoolPrep.sql spool cnstrnt.sql select 'Alter table '|| owner|| '.'|| table_name || ' &1 constraint ' || constraint_name || ';' from dba_constraints where constraint_type = 'R' and status <> UPPER( '&1.d' ) and owner not in ('SYS', 'SYSTEM') order by table_name desc ; Spool off @@isql_prefs @@cnstrnt