Want to post your scripts here in this blog ? Email it to snojha@gmail.com. You will be rewarded for your scripts if selected by our experts.

Wednesday, July 11, 2007

disable_fkeys.sql

SET PAGESIZE 0
SET FEEDBACK OFF
SET LINESIZE 150
SET VERIFY OFF

SPOOL temp.sql

SELECT 'ALTER TABLE "' || a.table_name || '" DISABLE CONSTRAINT "' || a.constraint_name || '";'
FROM all_constraints a
WHERE a.constraint_type = 'R'
AND a.owner = Upper('emsowner');

SPOOL OFF

@temp.sql

No comments: