RE: Disable all te constraints on a table

RE: Disable all te constraints on a table

 

  

Here sql command files to disable and enable all constraints:


set feedback off
set verify off
set echo off
prompt Finding constraints to disable...
set termout off
set pages 80
set heading off
set linesize 120
spool tmp_disable.sql
select 'spool igen_disable.log;' from dual;
select 'ALTER TABLE '||substr(c.table_name,1,35)||
' DISABLE CONSTRAINT '||constraint_name||' ;'
from user_constraints c, user_tables u
where c.table_name = u.table_name;
select 'exit;' from dual;
set termout on
prompt Disabling constraints now...
set termout off
@tmp_disable.sql;
exit
/



-----Original Message-----
From: Naser Ali
[mailto:oracledba-ezmlmshield-x68477215.[Email address protected]
Sent: Friday, July 30, 2004 11:10 AM
To: LazyDBA Discussion
Subject: Disable all te constraints on a table


Hello All
Is there a way to disable all the constraints on a table with a single SQL
statement.?

Thanks


--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html

Oracle LazyDBA home page