set echo off REM CONS_EN.SQL REM REM Meta-script for enabling constraints that are REM currently disabled. May be modified to enable REM only certain constraints. REM REM Oracle Workgroup Server Handbook REM Thomas B. Cox REM REM In this example, all primary constraints are enabled REM before any referential constraints are. REM REM Creates file EN_CONS.SQL set pagesize 0 set linesize 150 set heading off set feedback off set echo off connect anp/anp@iris spool en_cons.sql select 'alter table ' || table_name || ' enable constraint ' || constraint_name || ' ;' from user_constraints where status = 'DISABLED' and constraint_type = 'P' / select 'alter table' , table_name , 'enable constraint' , constraint_name , ';' from user_constraints where status = 'DISABLED' and constraint_type != 'P' / spool off prompt 'file en_cons.sql created' set heading on set feedback on set pagesize 40 set linesize 79 set echo on