Re: Disabling referential integrity contraints for an entire schema?

From: Francisco Piragibe <piragibe_at_iis.com.br>
Date: 1995/12/03
Message-ID: <30C1EFFD.3D9_at_iis.com.br>#1/1


Fred wrote:
>
> I am looking for a quick way to disable all referential integrity contraints
> for an entire schema. I need to do this in order to use the Import facility.
> Can anybody help me?Fred

I don't know if an easier way is possible, but I usually run this script for that:

set pages 0
set feed off
set pause off
set head off
spool ctdisable.sql
select 'ALTER TABLE ' || table_name || ' DISABLE CONSTRAINT ' || constraint_name ||

       ';'
from user_constraints
where constraint_type = 'R';
spool off
start ctdisable.sql

hope this can help you. Received on Sun Dec 03 1995 - 00:00:00 CET

Original text of this message