--disable fk
SELECT 'ALTER TABLE '|| table_name || ' DISABLE CONSTRAINTS ' || t.constraint_name ||';'
FROM user_constraints t
WHERE t.constraint_type = 'R';
--enable fk
SELECT 'ALTER TABLE '|| table_name || ' ENABLE CONSTRAINTS ' || t.constraint_name ||';'
FROM user_constraints t
WHERE t.constraint_type = 'R';