set echo off REM CONS_DIS.SQL REM REM Oracle Workgroup Server Handbook REM Thomas B. Cox REM REM Meta-script for disabling constraints that are REM currently enabled. May be modified to disable REM only certain constraints, such as Primary Keys, REM or Foreign Keys that reference a given table. REM REM Creates file DIS_CONS.SQL connect anp/anp@IRIS set pagesize 0 set linesize 150 set heading off set feedback off set echo off spool dis_cons.sql select 'alter table ' || table_name || ' disable constraint ' || constraint_name || ' ;' from user_constraints where status = 'ENABLED' and constraint_type = 'P' / spool off prompt 'file dis_cons.sql created' set heading on set feedback on set pagesize 40 set linesize 79 set echo on